Repository navigation
fix(status_list): make published lists world-readable - #39
Merged
Merged
Conversation
write_to_file stages each published list in a NamedTemporaryFile and renames it into place. NamedTemporaryFile always creates files 0600, so every published list, and its .alt sibling, which shutil.copy creates with the same mode, is readable only by the agent user. A web server serving the lists as a different user gets 403, and a verifier then cannot resolve any credential's status. Set the staged file to 0644 before the .alt copy is made. Signed-off-by: Eldersonar <slavaecu@gmail.com>
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.
Summary of Changes
write_to_filestages published status lists in aNamedTemporaryFile, which always creates files0600. The.altsibling inherits that mode viashutil.copy. A web server serving the lists as another user gets 403, so verifiers can't resolve any credential's status and fail closed.write_to_filesets the staged file to0644before the.altcopy..altsibling are both0644.Related Issues
Pull Request Checklist
Signed-off-byline (we use the DCO GitHub app to enforce this).scripts/preflightto run tests and check code style).CHANGELOG.mdis up to date and changed in this PR.