Repository navigation
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
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.zversion string, sosessionInformation()threwPageUnavailableErrorat the version check, before the page text was ever looked at:SuspendedIPErrorandBusyPageErrorcould 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):
PageUnavailableErrorSuspendedIPErrorPageUnavailableErrorBusyPageErrorPageUnavailableErrorPageUnavailableErrorTelling the suspension apart matters: retrying a login on a suspended IP keeps it suspended.