Skip to content

Commit 41dbb8d

Browse files
Release/v0.33.8 (#407)
* replacing the vulnerable swagger-ui with a safe one. * updating index.html page. * updated changelog. * Fix the vulnerability by upgrading Swagger UI to v3.51.2 * Suppress SA4005 Co-authored-by: MarcusSorealheis <[email protected]>
1 parent 5efedfc commit 41dbb8d

16 files changed

+75
-165
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v0.33.8
2+
- Upgrade the Swagger UI dependency to remove a very dangerous vulnerability (upgrade Swagger UI to v3.51.2).
3+
14
## v0.33.7
25
- Update requirements packages for docs.
36
- Update gotool version for pipeline.

dist/oauth2-redirect.html

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<!doctype html>
22
<html lang="en-US">
3-
<body onload="run()">
4-
</body>
5-
</html>
3+
<head>
4+
<title>Swagger UI: OAuth2 Redirect</title>
5+
</head>
6+
<body>
67
<script>
78
'use strict';
89
function run () {
@@ -17,19 +18,20 @@
1718
qp = location.search.substring(1);
1819
}
1920

20-
arr = qp.split("&")
21-
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})
21+
arr = qp.split("&");
22+
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
2223
qp = qp ? JSON.parse('{' + arr.join() + '}',
2324
function (key, value) {
24-
return key === "" ? value : decodeURIComponent(value)
25+
return key === "" ? value : decodeURIComponent(value);
2526
}
26-
) : {}
27+
) : {};
2728

28-
isValid = qp.state === sentState
29+
isValid = qp.state === sentState;
2930

3031
if ((
31-
oauth2.auth.schema.get("flow") === "accessCode"||
32-
oauth2.auth.schema.get("flow") === "authorizationCode"
32+
oauth2.auth.schema.get("flow") === "accessCode" ||
33+
oauth2.auth.schema.get("flow") === "authorizationCode" ||
34+
oauth2.auth.schema.get("flow") === "authorization_code"
3335
) && !oauth2.auth.code) {
3436
if (!isValid) {
3537
oauth2.errCb({
@@ -45,7 +47,7 @@
4547
oauth2.auth.code = qp.code;
4648
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
4749
} else {
48-
let oauthErrorMsg
50+
let oauthErrorMsg;
4951
if (qp.error) {
5052
oauthErrorMsg = "["+qp.error+"]: " +
5153
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
@@ -64,4 +66,10 @@
6466
}
6567
window.close();
6668
}
69+
70+
window.addEventListener('DOMContentLoaded', function () {
71+
run();
72+
});
6773
</script>
74+
</body>
75+
</html>

dist/swagger-ui-bundle.js

Lines changed: 2 additions & 92 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-es-bundle-core.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-es-bundle-core.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-es-bundle.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-es-bundle.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-standalone-preset.js

Lines changed: 2 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-standalone-preset.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)