fix potential vulnerability - codeql
parent
551dcc5cbf
commit
7d6ab7cc87
|
|
@ -36,7 +36,10 @@ router.route("/")
|
|||
.post(async (request, response) => {
|
||||
const userName = request.body.userName;
|
||||
const passwordPlain = request.body.password;
|
||||
const redirectURL = getSafeRedirectURL(request.body.redirect);
|
||||
const unsafeRedirectURL = request.body.redirect;
|
||||
const redirectURL = getSafeRedirectURL(typeof (unsafeRedirectURL) === "string" ?
|
||||
unsafeRedirectURL :
|
||||
"");
|
||||
const isAuthenticated = await authenticationFunctions.authenticate(userName, passwordPlain);
|
||||
let userObject;
|
||||
if (isAuthenticated) {
|
||||
|
|
|
|||
|
|
@ -59,7 +59,11 @@ router.route("/")
|
|||
const userName = request.body.userName as string;
|
||||
const passwordPlain = request.body.password as string;
|
||||
|
||||
const redirectURL = getSafeRedirectURL(request.body.redirect);
|
||||
const unsafeRedirectURL = request.body.redirect;
|
||||
|
||||
const redirectURL = getSafeRedirectURL(typeof (unsafeRedirectURL) === "string" ?
|
||||
unsafeRedirectURL :
|
||||
"");
|
||||
|
||||
const isAuthenticated = await authenticationFunctions.authenticate(userName, passwordPlain)
|
||||
let userObject: recordTypes.User;
|
||||
|
|
|
|||
Loading…
Reference in New Issue