Skip to content

Meta: URL signature expired on media content #21

@jamesmacwhite

Description

@jamesmacwhite

Describe the bug

Media content from Meta services like Facebook and Instagram can produce the error on content URLs e.g. image/video content due to the media URL having a limited life span.

URL signature expired

For example a URL like:

https://scontent-fra3-1.cdninstagram.com/v/t39.30808-6/600358981_1285474003608094_511479188559897144_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=103&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0FST1VTRUxfSVRFTS5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=ZJdrn_YbUOcQ7kNvwFEOiIx&_nc_oc=AdnzeRyh3ScNKvL4K5OFSgLLXAs4ZpAO4s5z-zCvLfDigbmJdHXvKCLx0renKrUen1M&_nc_zt=23&_nc_ht=scontent-fra3-1.cdninstagram.com&edm=AM6HXa8EAAAA&_nc_gid=Sm-x-4EV06uGGPNkPNMLxA&oh=00_AfmD1a89dQIultJKtTgpkpp15-rW6m5Cah0Lg-DoisSb0g&oe=694BF986

The oe parameter is a timestamp in hexadecimal, converted to decimal produces the unix timestamp of the expiry date.

If the feed content doesn't change or is cached for a period of time which goes beyond the expiry date of the media URL it will fail to load.

While this isn't a direct bug with the plugin, it does have a scenario where the cache shouldn't be set beyond a certain period for services like Facebook and Instagram.

This was detected over the Christmas period were our Facebook and Instagram feeds remained static for two week period which identified the issue.

Steps to reproduce

The direct reproduction of this depends on the media expiry and the time the feed is cached or not refreshed for. Factors like the frequency of the content changing or if the content goes stale would lead to the above scenario.

Craft CMS version

5.8.20

Plugin version

2.0.10

Multi-site?

Yes

Additional context

Potential options for this seem to be forcing the cache to clear more frequently in the event the content is stale? There are services/console commands available to do this, this might be the best option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions