[eric] browser: narrow the signed-in veto (notifications/profile appear logged out too)

This commit is contained in:
ciregenz
2026-07-26 22:56:47 -07:00
parent eea5ea3bd6
commit 404ca418a3
2 changed files with 18 additions and 2 deletions
@@ -70,9 +70,12 @@ P_SIGNIN_AFFORDANCE_RE = re.compile(
re.I)
# Anything only a signed-IN page shows. Its presence vetoes the verdict, so a stray "Log in" on an
# authenticated page (a second product's promo) can't make us tell the user to sign in again.
# Deliberately NARROW: an earlier draft also vetoed on "notifications"/"profile"/"inbox", which
# logged-OUT pages advertise all the time, and that silently suppressed the whole detector on the
# exact sites it exists for (measured: bsky with 0 cookies read as signed-in). Only a control that
# is meaningless unless you are already authenticated belongs here.
P_SIGNED_IN_RE = re.compile(
r'(?:sign|log)[_ -]?out|your profile|account menu|my account|notifications|'
r'<\s*(?:link|button)\s+"[^"]*(?:profile|avatar|inbox)',
r'(?:sign|log)[_ -]?out\b|your profile|account menu|my account',
re.I)