Skip to content

Harden default challenge code storage and name lookups - #64

Merged
go-kazuhiko-yamashita merged 1 commit into
masterfrom
fix/client-security
Oct 20, 2026
Merged

go-kazuhiko-yamashita merged 1 commit into
masterfrom
fix/client-security

Conversation

@go-kazuhiko-yamashita

Copy link
Copy Markdown
Contributor

Summary

Harden the default challenge code store and name lookups.

Changes

  • DefaultStoreChallengeCode / DefaultPopChallengeCode
    • Accept only user names that are a single path element
    • Create the file exclusively with mode 0600
    • Read it back only when it is a regular file owned by the current user (unix)
  • GetUserByName / GetGroupByName: encode the name query parameter
  • Add tests

Require the user name to be a single path element, create the challenge code file exclusively, and only read it back when it is a regular file owned by the current user. Encode the name query parameter in GetUserByName and GetGroupByName.
@go-kazuhiko-yamashita
go-kazuhiko-yamashita merged commit a57ed16 into master Oct 20, 2026
2 checks passed
@go-kazuhiko-yamashita
go-kazuhiko-yamashita deleted the fix/client-security branch October 20, 2026 08:05
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.

2 participants