Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PPP-5353]-XSS Findings For Pentaho-platform-plugin-reporting #874

Merged

Conversation

Rangashivani
Copy link

@Rangashivani Rangashivani commented Nov 15, 2024

PPP-5353-XSS Findings For Pentaho-platform-plugin-reporting

@Rangashivani Rangashivani requested a review from a team as a code owner November 15, 2024 12:44
@buildguy

This comment has been minimized.

@buildguy

This comment has been minimized.

@buildguy

This comment has been minimized.

@buildguy

This comment has been minimized.

@Rangashivani Rangashivani requested a review from dcleao November 21, 2024 06:05
@@ -818,7 +818,7 @@ define([ 'common-ui/util/util', 'common-ui/util/timeutil', 'common-ui/util/forma
if(isRunningIFrameInSameOrigin) {
if (!top.mantle_initialized) {
this._topMantleOpenTabRegistration = top.mantle_openTab = function(name, title, url) {
window.open(url, '_blank');
window.open(xssUtil.sanitizeUrl(url), '_blank');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use the new xssUtil.openWindow(..) method instead.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@@ -1189,7 +1189,7 @@ define([ 'common-ui/util/util', 'common-ui/util/timeutil', 'common-ui/util/forma
hideDlgAndPane(registry.byId('feedbackScreen'));

//Show loading screen
$('#notification-message').html(_Messages.getString('LoadingPage') + " " + mainJobStatus.page + " " + _Messages.getString('Of') + " " + mainJobStatus.totalPages);
$('#notification-message').html(xssUtil.sanitizeHtml(_Messages.getString('LoadingPage') + " " + mainJobStatus.page + " " + _Messages.getString('Of') + " " + mainJobStatus.totalPages));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use the xssUtil.setHtml(..) method, after support for jQuery objects has been added to setHtml(..) and setHtmlUnsafe(..).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@@ -1232,7 +1232,7 @@ define([ 'common-ui/util/util', 'common-ui/util/timeutil', 'common-ui/util/forma
isPageCountUpdated = true;
}

$('#notification-message').html(_Messages.getString('LoadingPage') + " " + mainJobStatus.page + " " + _Messages.getString('Of') + " " + mainJobStatus.totalPages);
$('#notification-message').html(xssUtil.sanitizeHtml(_Messages.getString('LoadingPage') + " " + mainJobStatus.page + " " + _Messages.getString('Of') + " " + mainJobStatus.totalPages));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idem, for use of xssUtil.setHtml(...) given a jQuery object.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@@ -1242,13 +1242,13 @@ define([ 'common-ui/util/util', 'common-ui/util/timeutil', 'common-ui/util/forma
case "QUEUED":
case "WORKING":
// Although we are hiding the screen latter, update the label anyway;
$('#notification-message').html(_Messages.getString('LoadingPage') + " " + mainJobStatus.page + " " + _Messages.getString('Of') + " " + mainJobStatus.totalPages);
$('#notification-message').html(xssUtil.sanitizeHtml(_Messages.getString('LoadingPage') + " " + mainJobStatus.page + " " + _Messages.getString('Of') + " " + mainJobStatus.totalPages));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idem, for use of xssUtil.setHtml(...) given a jQuery object.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@dcleao
Copy link
Contributor

dcleao commented Nov 21, 2024

New version of old PR, having unresolved comments: #864.

@buildguy

This comment has been minimized.

@buildguy
Copy link
Collaborator

❌ Build failed in 3m 44s

Build command:

mvn clean verify -B -e -Daudit -Djs.no.sandbox -pl core

👌 All tests passed!

Tests run: 540, Failures: 0, Skipped: 3    Test Results


Errors:

Filtered log (click to expand)

script returned exit code 1

ℹ️ This is an automatic message

@krishnaalluhitachi krishnaalluhitachi merged commit 1d912ac into pentaho:BACKLOG-41215 Dec 23, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants