Cybersecurity-Projects/PROJECTS/beginner/canary-token-generator/backend
CarterPerez-dev 30ebda39d5 fix(canary): PDF trigger URL uses ?p= query pad; handler trims trailing _
Audit F2: the PDF placeholder was padded with underscores embedded directly
in the /URI path, so Acrobat fetched /c/<id>____________ and the chi route
extracted the padded id. Lookup returned ErrNotFound, the webbug fallback
served a 1x1 GIF, and event recording skipped because tok was nil. PDF
tokens silently never recorded events.

Part B (durable): pad inside a ?p= query string so the trigger path stays
canonical and chi extracts the real id. Part A (defense in depth): handler
TrimRight on _ so PDFs already in the field also resolve correctly. Added
two regression tests: byte-after-id assertion in the PDF artifact, and the
handler's trim path.
2026-05-17 19:07:50 -04:00
..
cmd feat(canary): wire geoip into main with NopService fallback 2026-05-17 05:24:29 -04:00
internal fix(canary): PDF trigger URL uses ?p= query pad; handler trims trailing _ 2026-05-17 19:07:50 -04:00
.air.toml fix(canary-phase1): clear all post-phase-1 audit observations + header normalization 2026-05-10 06:15:26 -04:00
.gitignore fix(canary-phase0): address audit findings before phase rollup 2026-05-10 05:37:32 -04:00
.golangci.yml chore(canary): scope gosec G101/G107/G704 to outbound HTTP packages 2026-05-14 00:32:07 -04:00
config.yaml fix(canary-phase1): clear all post-phase-1 audit observations + header normalization 2026-05-10 06:15:26 -04:00
go.mod feat(canary): geoip wrapper package + config wiring 2026-05-17 05:23:53 -04:00
go.sum feat(canary): geoip wrapper package + config wiring 2026-05-17 05:23:53 -04:00