Page MenuHomePhabricator

0001-SECURITY-ve.ui.MWMediaDialog-Escape-plaintext-image-.patch

Authored By
matmarex
Oct 18 2021, 12:35 PM
Size
1 KB
Referenced Files
None
Subscribers
None

0001-SECURITY-ve.ui.MWMediaDialog-Escape-plaintext-image-.patch

From 13c819fc2ef727796a75a9c5cd411c0a343c6dc3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= <matma.rex@gmail.com>
Date: Mon, 18 Oct 2021 14:34:54 +0200
Subject: [PATCH] [SECURITY] ve.ui.MWMediaDialog: Escape plaintext image
metadata fields
Bug: T293589
Change-Id: I3a7175fab40ee98106ee3ff174dbc4762b29db7f
---
modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
index d13e66e9f..c160f5365 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
@@ -788,9 +788,9 @@ ve.ui.MWMediaDialog.prototype.cleanAPIresponse = function ( rawResponse, config
}
// Check if the string should be truncated
- return isTruncated && !config.ignoreCharLimit ?
+ return mw.html.escape( isTruncated && !config.ignoreCharLimit ?
originalText.substring( 0, charLimit ) + ellipsis :
- originalText;
+ originalText );
};
/**
--
2.28.0.windows.1

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9209028
Default Alt Text
0001-SECURITY-ve.ui.MWMediaDialog-Escape-plaintext-image-.patch (1 KB)

Event Timeline