Repository navigation
[codex] keep plugin auto-provision passwords bcrypt-safe - #33
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR fixes an issue where plugin-only passwords exceeded bcrypt's 72-byte input limit by reducing the random buffer from 32 to 24 bytes in the password generator, and adds a test to verify the constraint is met. ChangesPlugin Password Generation Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
I have tested and this fixes #31 |
Summary
Fixes #31 by reducing the random byte payload used by
randomPluginOnlyPassword()from 32 bytes to 24 bytes before hex encoding.The generated plugin-only password changes from
plugin-only-+ 64 hex chars, 76 bytes total, toplugin-only-+ 48 hex chars, 60 bytes total. That keeps the value below bcrypt's 72-byte input limit while preserving enough entropy for an internal password that is never meant for local login.Relationship to #30
This is related to the same plugin OAuth sign-in surface, but it is a separate backend auto-provisioning failure. #30 handled whether OAuth providers appear on the login page; this fixes first-time OAuth account creation once the OAuth flow completes.
Validation
go test ./internal/authgo test ./internal/api/handlersSummary by CodeRabbit
Bug Fixes
Tests