DEBUG=true prints the session encryption key and the admin password hash to the log #207
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
With
DEBUG=truethe GORM SQL log (internal/gormlog/gormlog.go, wired atinternal/database/database.go:161) prints fully interpolated statements, which at first boot includes:INSERT INTO settings ...carrying the base64 session encryption keyINSERT INTO users ...carrying the Argon2id password hashThe session key is the whole of the session security model: anyone holding it can forge an authenticated session cookie. Debug logs are routinely pasted into issues and chats, which is exactly the exposure path that #179 closed for Sentry.
#178 already routed GORM through
slogand bounded it. This is the remaining problem: it is not the volume of the statement but the values inside it.Definition of done:
settingsandusersare redacted in the GORM logger — log the statement shape, never the bound values, for those tablesDEBUG=trueon a fresh database and asserts neither the session key nor a password hash appears in captured log outputDEBUG=truedoes and does not expose