Test that the URL signature covers quality and fit (closes #60)
check / check (push) Failing after 2m18s
check / check (push) Failing after 2m18s
Add Quality and FitMode to signature.Request, not yet part of the signed data, and tests that a signature for quality 85 and fit cover is refused when replayed with another quality or fit: one against Signer.Verify, one through the image route. The route test also sends the same signature with no q or fit and with q=85&fit=cover, which must both pass, and sends URLs built by imgcache.Service.GenerateSignedURL. The replay cases fail until the next commit. Model: opus-4-8 (implementation); opus-5-5 (rework)
This commit is contained in:
1 parent
b7c1226c38
commit
306e075b5c
4 files changed
+199
No files matched your search
@@ -37,6 +37,15 @@ type Request struct {
|
||||
Height int
|
||||
// Format is the requested output format (e.g. "webp").
|
||||
Format string
|
||||
// Quality is the requested output quality (1-100) for lossy formats.
|
||||
// It is the effective value the request resolves to: callers pass the
|
||||
// default quality when the request omits the parameter, so an omitted
|
||||
// quality signs identically to that same value stated explicitly.
|
||||
Quality int
|
||||
// FitMode is how the image is fit into the requested dimensions
|
||||
// (e.g. "cover"). Like Quality it is the effective value: callers pass
|
||||
// the default fit mode when the request omits the parameter.
|
||||
FitMode string
|
||||
// Signature is the HMAC signature to verify.
|
||||
Signature string
|
||||
// Expires is the signature expiration timestamp.
|
||||
|
||||
Reference in new issue
Block a user