GeneratedLink should be immutable since it has both cacheable metadata and implements MarkupInterface

Created on 6 October 2015, over 9 years ago
Updated 7 April 2024, 10 months ago

Problem/Motivation

GeneratedLink objects are mutable - this is inherently dangerous because they provide cacheability metadata and markup.

Proposed resolution

Make them immutable.

Remaining tasks

User interface changes

API changes

Remove GeneratedLink::setGeneratedLink().

Data model changes

None

πŸ› Bug report
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated about 5 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    No discussion here for 9 years often means that an issue it outdated.

    Let's get confirmation that this problem still exists.

    Since we need to know if this is still relevant, I am setting the status to Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Cheers

  • Status changed to Needs work 4 months ago
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    Yes this is still relevant. It's problematic that GeneratedLink is mutable. As the issue shows it's not necessary. Removing mutability from the object will prevent bugs and incorrect usage and make it easier to do security reviews of code.

    Obviously we need to deprecate the current method as thats how we'd fix this now.

Production build 0.71.5 2024