-
Notifications
You must be signed in to change notification settings - Fork 174
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
Fix input validation in fiddle idpmock #1309
Fix input validation in fiddle idpmock #1309
Conversation
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
# Conflicts: # website/fiddle/package-lock.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss if you want :-)
window.location.href.match(/post_logout_redirect_uri=(.*?)(&|$)/)[1] | ||
); | ||
window.location.href = redirectTo; | ||
const disableJs = redirectTo.replace(/javascript:/gi, ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this is enough, since there are tons of possibilities how one could write javascript
according to https://owasp.org/www-community/xss-filter-evasion-cheatsheet .. But since we are checking if it starts with window.location.origin I couldn't find a possibility to sneak anything in. Just thinking if we remove that check at all just not to raise wrong safety feelings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say it's fine.
I tested:
`http://localhost:8080/auth/idpmock/logout.html?post_logout_redirect_uri=javascript:alert("XSS")
http://localhost:8080/auth/idpmock/logout.html?post_logout_redirect_uri=JaVaScRiPt:alert('XSS')
http://localhost:8080/auth/idpmock/logout.html?post_logout_redirect_uri=javascript:alert('XSS');
http://localhost:8080/auth/idpmock/logout.html?post_logout_redirect_uri=javascript:alert("RSnake says, 'XSS'")`
All of them aren't working.
We can think if we apply the last point in the issue description and replace window.location.origin
with the fiddle url but I think we can also do the implemented version.
* master: Migrate setup scripts to v1 (#1325) Add pre commit hook (#1344) Update npm dependencies in luigi-landingpage (#1346) Added read-only keyword labels to documentation (#1313) Cleanup the mock login page (#1340) Enable nightly builds (#1334) Fix input validation in fiddle idpmock (#1309) change travis to fix only on push to master (#1338) added selected state (#1326) Migrate example apps to v1 (#1311) Provide config in JS format to Fiddle e2e tests (#1305) Add Youtube section to the landing page and Documentation (#1315) Add a note about loadingIndicator to pageErrorHandler (#1310) Run compatibility tests in ci (#1307) Add possibility to unload Luigi (#1304)
* master: Enable nightly builds (SAP#1334) Fix input validation in fiddle idpmock (SAP#1309) change travis to fix only on push to master (SAP#1338) added selected state (SAP#1326) Migrate example apps to v1 (SAP#1311) Provide config in JS format to Fiddle e2e tests (SAP#1305) Add Youtube section to the landing page and Documentation (SAP#1315) Add a note about loadingIndicator to pageErrorHandler (SAP#1310) Run compatibility tests in ci (SAP#1307) Add possibility to unload Luigi (SAP#1304)
* feature-globalsearch: Migrate setup scripts to v1 (SAP#1325) Add pre commit hook (SAP#1344) Update npm dependencies in luigi-landingpage (SAP#1346) Added read-only keyword labels to documentation (SAP#1313) Cleanup the mock login page (SAP#1340) Enable nightly builds (SAP#1334) Fix input validation in fiddle idpmock (SAP#1309) change travis to fix only on push to master (SAP#1338) added selected state (SAP#1326) Migrate example apps to v1 (SAP#1311) Provide config in JS format to Fiddle e2e tests (SAP#1305) Add Youtube section to the landing page and Documentation (SAP#1315) Add a note about loadingIndicator to pageErrorHandler (SAP#1310) Run compatibility tests in ci (SAP#1307) Add possibility to unload Luigi (SAP#1304)
* search-provider-interface: Migrate setup scripts to v1 (SAP#1325) Add pre commit hook (SAP#1344) Update npm dependencies in luigi-landingpage (SAP#1346) Added read-only keyword labels to documentation (SAP#1313) Cleanup the mock login page (SAP#1340) Enable nightly builds (SAP#1334) Fix input validation in fiddle idpmock (SAP#1309) change travis to fix only on push to master (SAP#1338) added selected state (SAP#1326) Migrate example apps to v1 (SAP#1311) Provide config in JS format to Fiddle e2e tests (SAP#1305) Add Youtube section to the landing page and Documentation (SAP#1315) Add a note about loadingIndicator to pageErrorHandler (SAP#1310) Run compatibility tests in ci (SAP#1307) Add possibility to unload Luigi (SAP#1304)
Fixes #1290