Skip to content

Commit a0b5627

Browse files
authored
remove attributes from request cookies (#663)
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
1 parent bed4d7c commit a0b5627

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

single-page-app/verify.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ test_auth () {
186186
echo "$RESPONSE" | grep "set-cookie: OauthExpires="
187187
echo "$RESPONSE" | grep "set-cookie: BearerToken="
188188

189-
HMAC=$(echo "$RESPONSE" | grep "set-cookie: OauthHMAC=" | cut -d' ' -f2-)
190-
OAUTH_EXPIRES=$(echo "$RESPONSE" | grep "set-cookie: OauthExpires=" | cut -d' ' -f2-)
191-
TOKEN=$(echo "$RESPONSE" | grep "set-cookie: BearerToken=" | cut -d' ' -f2-)
189+
HMAC=$(echo "$RESPONSE" | grep "set-cookie: OauthHMAC=" | sed -E 's/^set-cookie: (OauthHMAC=[^;]+);.*$/\1/')
190+
OAUTH_EXPIRES=$(echo "$RESPONSE" | grep "set-cookie: OauthExpires=" | sed -E 's/^set-cookie: (OauthExpires=[^;]+);.*$/\1/')
191+
TOKEN=$(echo "$RESPONSE" | grep "set-cookie: BearerToken=" | sed -E 's/^set-cookie: (BearerToken=[^;]+);.*$/\1/')
192192
COOKIES=(
193193
--cookie "$HMAC"
194194
--cookie "$OAUTH_EXPIRES"

0 commit comments

Comments
 (0)