Lower-case the image URL's host and require a signature for a port (closes #246)
check / check (push) Waiting to run
check / check (push) Waiting to run
With cdn.example.com allowlisted, CDN.Example.com and cdn.example.com:8443 passed the allowlist too, and each spelling had its own cache entries and its own connections under upstream_connections_per_host. The image URL parser now lower-cases the host and refuses one holding "@" with ErrInvalidHost (400). ValidateRequest counts a host followed by ":", with or without a port, as not allowlisted, so it needs a signature. That check is not in allowlist.IsAllowed, which also matches referer_blocklist. A URL is now signed over the lower-cased host; README.md says so. Model: opus-5-5
This commit is contained in:
@@ -30,6 +30,17 @@ P2: security: per-origin rate limiting
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-10-15 the host of a `/v1/image/` URL is lower-cased, and one with a port
|
||||
needs a signature (closes #246): with `cdn.example.com` allowlisted,
|
||||
`CDN.Example.com` and `cdn.example.com:8443` passed the allowlist too, and
|
||||
each spelling was fetched and cached on its own and had connections of its own
|
||||
under `upstream_connections_per_host`. The image URL parser now lower-cases
|
||||
the host and refuses one holding `@`, which a URL reads as a user name and
|
||||
password, with 400. A host with a port, or with a `:` and no port, needs a
|
||||
signature even when it is allowlisted. That is checked in the image service,
|
||||
not in `allowlist.IsAllowed`, which also matches `referer_blocklist`, where a
|
||||
`Referer` is blocked whatever its port. A URL is signed over the lower-cased
|
||||
host.
|
||||
- 2026-10-13 `fit=outside` no longer makes an output above 8192 on a side
|
||||
(closes #257): it scales the image to cover the requested size, and the side
|
||||
scaled past that size was held to no maximum, so `1x8192?fit=outside` of a
|
||||
|
||||
Reference in New Issue
Block a user