mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-03 13:34:36 +00:00
Fix v1 return to path
This commit is contained in:
parent
da16e8d01f
commit
298ee2dbb4
3 changed files with 3 additions and 3 deletions
|
@ -37,7 +37,7 @@ module.exports = TokenAccessController =
|
|||
if !projectExists and settings.overleaf
|
||||
logger.log {token, userId},
|
||||
"[TokenAccess] no project found for this token"
|
||||
return res.redirect(302, "/sign_in_to_v1?return_to=#{settings.overleaf.host}/#{token}")
|
||||
return res.redirect(302, "/sign_in_to_v1?return_to=/#{token}")
|
||||
if !project?
|
||||
logger.log {token, userId},
|
||||
"[TokenAccess] no token-based project found for readAndWrite token"
|
||||
|
|
|
@ -422,7 +422,7 @@ describe 'TokenAccess', ->
|
|||
try_read_and_write_token_access(@owner, unimportedV1Token, (response, body) =>
|
||||
expect(response.statusCode).to.equal 302
|
||||
expect(response.headers.location).to.equal(
|
||||
'/sign_in_to_v1?return_to=http://overleaf.test:5000/123abc'
|
||||
'/sign_in_to_v1?return_to=/123abc'
|
||||
)
|
||||
, done)
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ describe "TokenAccessController", ->
|
|||
expect(@res.redirect.callCount).to.equal 1
|
||||
expect(@res.redirect.calledWith(
|
||||
302,
|
||||
'/sign_in_to_v1?return_to=http://overleaf.test:5000/123abc'
|
||||
'/sign_in_to_v1?return_to=/123abc'
|
||||
)).to.equal true
|
||||
done()
|
||||
|
||||
|
|
Loading…
Reference in a new issue