Skip to content

Commit b36b6d6

Browse files
committed
handle the redirectUri.
1 parent a808837 commit b36b6d6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/login-hedgedoc-via-gitlab.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,12 @@ function step4-5() {
126126
-H 'Upgrade-Insecure-Requests: 1' \
127127
-b $cookie -c $cookie \
128128
--insecure)
129-
129+
echo $body
130130
link=$(echo $body | grep window.location | perl -ne 'print "$1\n" if /.*?window.location= "(.+?)";/')
131+
# if not found, try to parse again
132+
if [ -z "$link" ]; then
133+
link=$(echo $body | grep window.location | perl -ne 'print "$1\n" if /.*?let redirectUri = "(.+?)";/')
134+
fi
131135
echo "WILL REDIRECT TO $link "
132136

133137

0 commit comments

Comments
 (0)