Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip hot fix #401

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions routes/profile.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -1178,11 +1178,13 @@

router.get(
'/callback/link/facebook',
passport.authenticate('link_facebook_account', {
failureRedirect:
(process.env.NODE_ENV === "mainnet" ? (req.origins.header.includes('https://app.satt.com') ? process.env.METAMASK_BASED_URL : process.env.BASED_URL) : process.env.BASED_URL ) +
'/home/settings/social-networks?message=access-denied',
}),
(req, res, next) => {
passport.authenticate('link_facebook_account', {
failureRedirect:
(process.env.NODE_ENV === "mainnet" ? (req.origins.header.includes('https://app.satt.com') ? process.env.METAMASK_BASED_URL : process.env.BASED_URL) : process.env.BASED_URL ) +

Check failure

Code scanning / CodeQL

Incomplete URL substring sanitization High

'
https://app.satt.com
' can be anywhere in the URL, and arbitrary hosts may come before or after it.
'/home/settings/social-networks?message=access-denied',
})(req, res, next)
},
Comment on lines +1181 to +1187

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
authorization
, but is not rate-limited.
async (req, response) => {
try {
let state = req.query.state.split('|')
Expand Down Expand Up @@ -1231,11 +1233,13 @@

router.get(
'/callback/link/google',
passport.authenticate('link_google_account', {
failureRedirect:
(process.env.NODE_ENV === "mainnet" ? (req.origins.header.includes('https://app.satt.com') ? process.env.METAMASK_BASED_URL : process.env.BASED_URL) : process.env.BASED_URL ) +
'/home/settings/social-networks?message=access-denied',
}),
(req, res, next) => {
passport.authenticate('link_google_account', {
failureRedirect:
(process.env.NODE_ENV === "mainnet" ? (req.origins.header.includes('https://app.satt.com') ? process.env.METAMASK_BASED_URL : process.env.BASED_URL) : process.env.BASED_URL ) +

Check failure

Code scanning / CodeQL

Incomplete URL substring sanitization High

'
https://app.satt.com
' can be anywhere in the URL, and arbitrary hosts may come before or after it.
'/home/settings/social-networks?message=access-denied',
})(req,res,next)
},
Comment on lines +1236 to +1242

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
authorization
, but is not rate-limited.
async (req, res) => {
try {
let state = req.query.state.split('|')
Expand Down