fix(css): remove dead main:has(.book-show) max-width + fix reader comment (bookshelf-sgv1d) #1234
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bd-bookshelf-sgv1d"
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?
Summary
Remove dead CSS rule and fix stale documentation:
main:has(.book-show){max-width:none}rule (line 3101-3105) since main no longer has a global max-width.reader-columnwhen it's actually.reader-viewer{max-width:700px}This is a pure cleanup with no visual impact.
Closes bead bookshelf-sgv1d on merge.
The main:has(.book-show) max-width rule is a no-op since main no longer has a global max-width. Remove dead CSS and fix the stale comment that incorrectly attributed the reader width constraint to .reader-column; it's actually .reader-viewer{max-width:700px}. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>Security Review — PR #1238 (mysql driver log → slog)
Adversarial focus: credential leakage via the driver logger, log injection/forging, global
SetLoggerabuse, new boundaries.(1) Secret leakage — CLEAR. Audited every call site that reaches the driver's
Logger.Printin go-sql-driver/mysql v1.9.3:connection.go:64(mc.log),connector.go:119/148,packets.go:58/68/86/100/155,auth.go:341,connection.go:189/214/706. All emit error strings, auth-plugin names, or sequence numbers.cfg.Passwdis referenced only inauth.go(scramble) anddsn.go:262(FormatDSN) — neither reaches the logger, and the DSN itself is never passed toPrint. So this path cannot surface credentials and does not bypassmaskDSN(the DSN never enters it).(2) Log injection / forging — CLEAR. The driver message is passed to
logger.Warn(msg). slog handlers escape themsgfield (JSONHandler JSON-escapes newlines/quotes; TextHandler quotes on special chars), so an embedded newline cannot forge a fake log record. Driver messages are driver-internal, not app-user input; the only externally-influenced content (a server-returned error string) presupposes a trusted-DB compromise and is escaped regardless.(3) Global
SetLoggerside-effect — CLEAR.installDriverLoggersets the driver's package logger to the app's own*slog.Logger(last-caller-wins, documented). No external input controls the installed logger; not abusable.(4) New inputs/boundaries — none. No new request surface, no user-supplied data, no multi-user-scoping surface.
No findings.
REVIEW VERDICT: 0 blocker, 0 major, 0 minor
[MINOR] static/css/main.css — commit message accuracy
The commit message describes the removed
main:has(.book-show)rule as "dead CSS" and the selector as "dead", but this is inaccurate. The.book-showselector IS rendered in the template (templates/pages/books_show.html:32), making it an active selector. The rule itself is correctly identified as a no-op/inert (themainelement never has amax-widthproperty set anywhere), but describing an active selector as "dead" conflates two separate concepts. The CSS comment already documented this as "no-op — kept as explicit documentation of the intent," so the characterization should be "removing inert rule" rather than "removing dead selector."The actual changes are correct and safe:
.reader-column→.reader-vieweris accurate (verified:.reader-viewerhasmax-width: 700px,.reader-columndoes not)REVIEW VERDICT: 0 blocker, 0 major, 1 minor
Security Review — PR #1234
Reviewed the diff (removes an inert
main:has(.book-show){max-width:none}rule + corrects a stale CSS comment instatic/css/main.css).Verification performed:
max-widthis set onmainanywhere else inmain.css, andmax-width:noneis the CSS initial value, so removal changes nothing rendered.max-widthis a pure layout property — notcontain,overflow, visibility,clip, or any containment/isolation control. No security-relevant affordance is dropped..reader-viewercarriesmax-width:700px; the previously-named.reader-columnhas no max-width (flex:1). The corrected reference points at the element that actually constrains width.No findings.
REVIEW VERDICT: 0 blocker, 0 major, 0 minor
e8760a2fcaf1603ce0b2