-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Context
This follow-up task was identified during the review of PR #255.
Source PR: #255
PR Title: feat: smart form validation with field types and HTML5 attrs
Suggested by: @claude[bot] (mentioned in 3 separate reviews)
Task Description
The password field type maps to SQLType: "TEXT" and the generated AddInput/UpdateInput structs pass the raw password string directly to the DB insert/update query. There is no hashing step generated anywhere in the handler.
Developers scaffolding a resource with secret:password will likely ship plaintext passwords unless they manually add hashing.
Options
- Generate a
// TODO: hash this field with bcrypt before storingcomment adjacent to any password field in the handler - Generate the
bcrypt.GenerateFromPasswordcall inline and add thegolang.org/x/crypto/bcryptimport - Generate a
hashPassword()helper function in the handler
Option 2 or 3 is preferred since TODO comments are easily missed.
Original Comment
The generated handler stores the password value directly into the database with no hashing. The
passwordtype maps toSQLType: "TEXT"and the generatedAddInput/UpdateInputstructs will pass the raw string straight to the insert/update query.
This issue was automatically created by prmonitor from PR review comments.