Skip to content

fix(session-information): report a suspended IP (and a busy page) even though the page has no version - #1

Open
cheapmanga wants to merge 1 commit into
BlocksHub:mainfrom
cheapmanga:fix/suspended-ip-detection
Open

cheapmanga wants to merge 1 commit into
BlocksHub:mainfrom
cheapmanga:fix/suspended-ip-detection

Conversation

@cheapmanga

Copy link
Copy Markdown

The IP suspension page ("Votre adresse IP est provisoirement suspendue") and the maintenance page ("Le site est momentanément indisponible") have no PRONOTE x.y.z version string, so sessionInformation() threw PageUnavailableError at the version check, before the page text was ever looked at: SuspendedIPError and BusyPageError could not be raised for them.

The page text is now checked first, by one helper shared with the parsing-failure path. Pages with a version are handled exactly as before.

Checked against the error pages (before → after):

Page Before After
IP suspended PageUnavailableError SuspendedIPError
Maintenance PageUnavailableError BusyPageError
Anything else PageUnavailableError PageUnavailableError

Telling the suspension apart matters: retrying a login on a suspended IP keeps it suspended.

…n though the page has no version

The IP suspension page and the maintenance page carry no "PRONOTE x.y.z" version, so the version check
threw PageUnavailableError before the page text was ever looked at: SuspendedIPError and BusyPageError
were unreachable for them. The page is now checked first, by the same helper as the parsing failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant