aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2023-05-15 21:29:39 +0200
committerTeddy Wing2023-05-15 21:29:39 +0200
commit0faf1c0cf520c08116786f64cc17defa6acd92f1 (patch)
tree6394e5bd91d0ac9bffcce8b856efe8b4031d5b5d
parentc175d9dc7e3df6af0905b7b597fae67539ce6c6c (diff)
downloadcws-status-0faf1c0cf520c08116786f64cc17defa6acd92f1.tar.bz2
cws-status: Add new logged out check
There's another instance when the user can be logged out and the "Sign in to continue" string doesn't appear on the page. Also report this as a logged out error.
-rw-r--r--cws-status4
1 files changed, 3 insertions, 1 deletions
diff --git a/cws-status b/cws-status
index b6c1fff..d65049b 100644
--- a/cws-status
+++ b/cws-status
@@ -85,8 +85,10 @@ page_html = opener.open(url).read()
# Check whether we're authenticated.
not_logged_in_search = b'Sign in to continue to Chrome Web Store'
+signin_search = b'<base href="https://accounts.google.com/v3/signin/"'
-if not_logged_in_search in page_html:
+if not_logged_in_search in page_html \
+or signin_search in page_html:
print('error: not authenticated', file=sys.stderr)
sys.exit(EX_NOUSER)