Skip to content

Commit a6c46ee

Browse files
committed
[PPP-5351]-XSS Findings For Data-Access ,Pentaho-platform-plugin-dashboards
1 parent 7c1b5fa commit a6c46ee

File tree

1 file changed

+5
-3
lines changed
  • assemblies/data-access-plugin/src/main/resources/resources/web/messages

1 file changed

+5
-3
lines changed

assemblies/data-access-plugin/src/main/resources/resources/web/messages/Messages.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1313
* See the GNU Lesser General Public License for more details.
1414
*
15-
* Copyright (c) 2002-2017 Hitachi Vantara.. All rights reserved.
15+
* Copyright (c) 2002-2024 Hitachi Vantara.. All rights reserved.
1616
*/
1717

18+
define(["common-ui/util/xss"], function(xssUtil) {
1819
Messages = function()
1920
{
2021
};
@@ -49,7 +50,7 @@ Messages.entityDecoder=document.createElement('textarea');
4950
Messages.html_entity_decode = function(str)
5051
{
5152
try{
52-
Messages.entityDecoder.innerHTML = str;
53+
xssutil.setHtml(Messages.entityDecoder, str)
5354
var value = Messages.entityDecoder.value;
5455
value = unescape(value);
5556
return value;
@@ -117,8 +118,9 @@ var cnt = 0;
117118
element = elementOrId;
118119
}
119120
if (element) {
120-
element.innerHTML = Messages.getString(msgKey);
121+
xssutil.setHtml(element, Messages.getString(msgKey));
121122
}
122123
};
123124
/* static init */
124125
Messages.init();
126+
});

0 commit comments

Comments
 (0)