mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-17 01:02:33 +00:00
do null check on csrf token in smoke test
This commit is contained in:
parent
e9232eb197
commit
4c905c168a
1 changed files with 5 additions and 1 deletions
|
@ -18,7 +18,11 @@ describe "Opening", ->
|
|||
"""
|
||||
child.exec command, (err, stdout, stderr)->
|
||||
if err? then done(err)
|
||||
csrf = stdout.match("<input name=\"_csrf\" type=\"hidden\" value=\"(.*?)\">")[1]
|
||||
csrfMatches = stdout.match("<input name=\"_csrf\" type=\"hidden\" value=\"(.*?)\">")
|
||||
if !csrfMatches?
|
||||
logger.err stdout:stdout, "smoke test: does not hace csrf token"
|
||||
return("smoke test: does not hace csrf token")
|
||||
csrf = csrfMatches[1]
|
||||
|
||||
# Change cookie to be non secure so curl will send it
|
||||
fs = require("fs")
|
||||
|
|
Loading…
Reference in a new issue