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.
There was an issue with the relogin logic, that breaks almost every fetcher that depends on the student number on the app.
When the user login info is saved, the username is saved as
upxxxxxxxxx
beingx
digits. When the app loads, it loads a fake session onSessionProvider.restoreSession()
with username being the one loaded from user preferences (so therefore it loadsupxxxxxxxxx
) , whenNetworkRouter.getWithCookies
is called for the first time, it will try to do the request but it will know that this session is not valid (because on app start, it will have no cookies) and try to relogin. The cookies are copied from the newSession to the session that was given as an argument. The problem is that, the username stays the same so in theupxxxxxxxxx
form, and every api to sigarra that needs a student number expects only the number part, breaking almost all fetchers.Review checklist
whatsnew/whatsnew-pt-PT
changelog.md
with the change