Skip to content

Commit

Permalink
fix: FORMS-893 semver vuln and endpoint bug (#1094)
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterMoar authored Oct 19, 2023
1 parent a9e6b7f commit d6858f6
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 27 deletions.
5 changes: 4 additions & 1 deletion tests/load/load-test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ const getToken = async () => {

return new Promise((resolve, reject) => {
const start = performance.now();
const endpoint = `${auth.host}/realms/${auth.realm}/protocol/openid-connect/token`;
const endpoint = config.get('auth.host').startsWith('https://')
? `${auth.host}/auth/realms/${auth.realm}/protocol/openid-connect/token`
: `${auth.host}/realms/${auth.realm}/protocol/openid-connect/token`;
const postData = `grant_type=password&client_id=${auth.clientId}&username=${auth.username}&password=${auth.password}`;

const options = {
Expand Down Expand Up @@ -142,6 +144,7 @@ const createForm = async (token, schema) => {
},
};

log.debug(`${apiPath()}/forms`);
const req = http.request(`${apiPath()}/forms`, options, (res) => {
let data = '';

Expand Down
122 changes: 97 additions & 25 deletions tests/load/load-test/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/load/load-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"bytes": "^3.1.2",
"config": "^3.3.9",
"jsonwebtoken": "^9.0.0",
"jsonwebtoken": "^9.0.2",
"npmlog": "^7.0.1"
}
}

0 comments on commit d6858f6

Please sign in to comment.