mirror of
https://github.com/profullstack/agentbbs.git
synced 2026-11-30 17:07:49 +00:00
security: reject unsafe usernames at account creation (#171)
The hub auto-created an account from the raw SSH login name for any new
key, skipping SanitizeUsername. Names containing '/', '..', spaces or
shell metacharacters were accepted, and the per-user directory
users/<name> could resolve outside users/.
store.EnsureUser now refuses to insert a name that fails
ValidUsername (^[a-z0-9][a-z0-9-]{1,31}$), covering every creation path;
the hub prints a clear error. The root IRC password helper applies the
same rule to its argv.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
87cfa61b1f
commit
388360012c
5 changed files with 71 additions and 1 deletions
BIN
scripts/__pycache__/set-irc-password.cpython-312.pyc
Normal file
BIN
scripts/__pycache__/set-irc-password.cpython-312.pyc
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue