-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Removing URL query param from swagger UI to fix the XSS issue #23234
Removing URL query param from swagger UI to fix the XSS issue #23234
Conversation
Labelling this PR as size/S |
Verified that http://localhost:8080/swagger-ui/?url=http://api.ma.la/tmp/cors/swi/ works fine after this fix. It resulted in an XSS before. |
I can send the same fix to kubernetes.io if this looks good |
GCE e2e build/test passed for commit a9f80c2c3108e9b31f835fbde19fa2489f8ed588. |
Has this been fixed upstream? |
Am not sure if upstream requires the URL query param: swagger-api/swagger-ui#830 (comment). Will push the change to upstream, if they are fine with removing the query param. |
They replied that they need the query param on upstream. So this is just a hack on our side |
GCE e2e build/test passed for commit ded122df95f8571a444ddf01f05f5a4bc2c7e854. |
LGTM. Please squash. cc @liggitt |
ded122d
to
532398a
Compare
Thanks, squashed. Adding LGTM label as per comment above. |
GCE e2e build/test passed for commit 532398a. |
Automatic merge from submit-queue |
Auto commit by PR queue bot
…lQuery Auto commit by PR queue bot (cherry picked from commit b50e89e)
Commit 5986414 found in the "release-1.2" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this s an error find help to get your PR picked. |
…lQuery Auto commit by PR queue bot (cherry picked from commit b50e89e)
…lQuery Auto commit by PR queue bot (cherry picked from commit b50e89e)
…lQuery Auto commit by PR queue bot (cherry picked from commit b50e89e)
…lQuery Auto commit by PR queue bot (cherry picked from commit b50e89e)
Removing the URL query param from swagger UI to fix the reported XSS issue: swagger-api/swagger-ui#830 (comment).
Note that we are now disabling swagger UI by default, so this is not as critical. But it will still be good to fix the XSS for those who want to enable swagger UI on their master.
Note that there might be more XSS issues (indeed swagger-api/swagger-ui#830 had reported a bunch of them), but there was a clear repro for only this one.
@bgrant0607 @kubernetes/docs