-
Notifications
You must be signed in to change notification settings - Fork 13
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
add social networks redirection for metamask app #400
Conversation
@@ -645,7 +645,7 @@ | |||
(req, res, next) => { | |||
passport.authenticate('facebook_strategy_add_channel', { | |||
failureRedirect: | |||
process.env.BASED_URL + | |||
(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
@@ -655,7 +655,7 @@ | |||
redirect = req.query.state.split('|')[1] | |||
let message = req.authInfo.message | |||
response.redirect( | |||
process.env.BASED_URL + | |||
(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
@@ -743,7 +743,7 @@ | |||
if (!req.query.error) next() | |||
else | |||
res.redirect( | |||
process.env.BASED_URL + | |||
(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
@@ -754,7 +754,7 @@ | |||
let redirect = req.query.state.split('|')[1] | |||
let message = req.authInfo.message | |||
res.redirect( | |||
process.env.BASED_URL + | |||
(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
@@ -804,7 +804,7 @@ | |||
(req, res, next) => { | |||
passport.authenticate('tikTok_strategy_add_channel', { | |||
failureRedirect: | |||
process.env.BASED_URL + | |||
(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
@@ -882,7 +882,7 @@ | |||
message = 'account_linked_with_success' | |||
} | |||
res.redirect( | |||
process.env.BASED_URL + redirect + '?message=' + message | |||
(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 ) + redirect + '?message=' + message |
Check failure
Code scanning / CodeQL
Incomplete URL substring sanitization High
https://app.satt.com
@@ -1180,15 +1180,15 @@ | |||
'/callback/link/facebook', | |||
passport.authenticate('link_facebook_account', { | |||
failureRedirect: | |||
process.env.BASED_URL + | |||
(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
'/home/settings/social-networks?message=access-denied', | ||
}), | ||
async (req, response) => { | ||
try { | ||
let state = req.query.state.split('|') | ||
let url = state[1] | ||
response.redirect( | ||
process.env.BASED_URL + url + '?message=' + req.authInfo.message | ||
(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 ) + url + '?message=' + req.authInfo.message |
Check failure
Code scanning / CodeQL
Incomplete URL substring sanitization High
https://app.satt.com
@@ -1233,15 +1233,15 @@ | |||
'/callback/link/google', | |||
passport.authenticate('link_google_account', { | |||
failureRedirect: | |||
process.env.BASED_URL + | |||
(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
'/home/settings/social-networks?message=access-denied', | ||
}), | ||
async (req, res) => { | ||
try { | ||
let state = req.query.state.split('|') | ||
let url = state[1] | ||
let message = req.authInfo.message | ||
res.redirect(process.env.BASED_URL + url + '?message=' + message) | ||
res.redirect((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 ) + url + '?message=' + message) |
Check failure
Code scanning / CodeQL
Incomplete URL substring sanitization High
No description provided.