Remove url query param that is leading to XSS issue

This commit is contained in:
nikhiljindal
2016-03-18 17:35:29 -07:00
parent b5fa14609e
commit 532398afb3
3 changed files with 5 additions and 13 deletions

View File

@@ -17,6 +17,8 @@ https://github.com/swagger-api/swagger-ui#how-to-use-it
https://github.com/swagger-api/swagger-ui#how-to-use-it
- Modified swagger-ui.js to list resources and operations in sorted order: https://github.com/kubernetes/kubernetes/pull/3421
- Set supportedSubmitMethods: [] in index.html to remove "Try it out" buttons.
- Remove the url query param to fix XSS issue:
https://github.com/kubernetes/kubernetes/pull/23234
LICENSE file has been created for compliance purposes.
Not included in original distribution.

View File

@@ -24,12 +24,7 @@
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
<script type="text/javascript">
$(function () {
var url = window.location.search.match(/url=([^&]+)/);
if (url && url.length > 1) {
url = decodeURIComponent(url[1]);
} else {
url = "../../swaggerapi";
}
var url = "../../swaggerapi";
window.swaggerUi = new SwaggerUi({
url: url,
dom_id: "swagger-ui-container",