Repository navigation
Group papers ask pre-group and expired sessions to sign in again - #18
Merged
Merged
Conversation
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.
What and why
Fixes #17. A session from before group readers has no recorded groups, so a group paper answered it with a bare 404. Signing out and back in fixed it, but nothing told the reader so.
022_groups_checked.sqladdssessions.groups_checked. Sign-in sets it when it asks for thegroupsscope. Older sessions, and sessions from a configuration without group readers, read as unchecked./p/{paper}/…for any paper a group of its issuer reads answers with the sign-in page ("Sign in again to read this paper."), and the sign-in link carriesnext. With no paper of its own, the session is asked to sign in at once./login?next=only accepts a same-site/p/{paper}/…path (no other origin, no..). After the callback, the reader lands back on that page.How tested
go test ./...,go vet ./...,gofmt -l .,node --test web/sw_test.jsTestUncheckedGroupsAskForSignIn(auth): unchecked, other issuer, checked without the paper, expired, no group readers.TestPreGroupSessionSignsInAgain(reader): the 401 page withnext, unrelated papers still 404, the round trip back to the paper, a checked non-member still 404.TestReturnPath.Checklist
go test ./...passesgofmt -l .is clean🤖 Generated with Claude Code