Skip to content

Leaving out max-age on amp-script leads to invalid signature #395

@dritter

Description

@dritter

Hi there!

We use an amp-script with script attribute, but without specifying a max-age. When trying to verify the signature, it turns out to be invalid (message: "sig_expires is in the past").. AFAIK the default expiration time for that case is 1 day.

Looking over the code, it looks like the expiration is calculated based on 24 hours prior to now. That is rather odd to me. Wouldn't that code lead to an expiration of 0 (aka the current time)? And secondly, isn't the minimal max-age > 86400 now?

We worked around that by setting a max-age to a high value (1 year) explicitly.

Thanks in advance.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions