Skip to content

Commit

Permalink
asd
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop committed Nov 3, 2023
1 parent 4189efa commit f10c3e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/routes/oauth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const oauthProviders = Router()
*
* The redirect url has been set in the previous middleware and is available in the locals
*/
.all(`${OAUTH_ROUTE}/:provider`, ({ headers, params: { provider } }, res, next) => {
.all(`${OAUTH_ROUTE}/:provider`, ({ headers: {host}, params: { provider } }, res, next) => {
const redirectTo: string = res.locals.redirectTo;
const providerConfig = grantConfig[provider];
// * Check if provider is enabled
Expand All @@ -115,8 +115,8 @@ export const oauthProviders = Router()
);
}

if ( headers.host ) {
providerConfig.origin = headers.host.split("/signin")[0];
if ( host ) {
providerConfig.origin = host.split("/signin")[0];

Check warning

Code scanning / CodeQL

Prototype-polluting assignment Medium

This assignment may alter Object.prototype if a malicious '__proto__' string is injected from
user controlled input
.
}

next();
Expand Down

0 comments on commit f10c3e4

Please sign in to comment.