Watch
1
0
Fork
You've already forked pkg-proxy
1
mirror of https://github.com/git-pkgs/proxy.git synced 2026-11-10 08:09:17 -05:00
Commit graph pkg-proxy/internal/server/templates_handlers_test.go
Author SHA1 Message Date
simon chrzanowski
f5e7599749
Stop interpolating archive paths into inline handlers
The source browser built its file tree with onclick handlers such as
loadFile('${escapeHTML(file.path)}'). The browser decodes HTML entities in
an attribute before running the handler, so the ' that escapeHTML
produces turns back into a quote and ends the string. A cached package
with a crafted file name ran script on the proxy origin for anyone who
browsed it.

- Carry the path in data-path and dispatch clicks from one delegated
  listener on the file tree
- Render the binary download button as a link instead of an onclick
  that assigns window.location
- Fail the template tests when an inline handler interpolates data
2026-10-14 08:37:40 +02:00