Metadecidim
Sign in

Process

Report a Bug

finished not yet on protocol

Links in Proposal's body disappear

We've found a bug or feature that has disappeared with one of the upgrades.

Before, when you created a proposal, you could add links to be able to relate it to external documents or wherever you wanted.
And for us, it is very important to maintain this functionality as it is the transparency tool in which the whole process can be consulted.

We have been reviewing the code, and we have seen that it is related to this PR https://github.com/decidim/decidim/pull/5037 and simple_format method.

8 comments

  1. The reasoning behind that is that allowing HTML links is a security issue, since there could be many XSS attacks and similar.

    One solution could be to automatically parse URLs and link them, this way we can have links and avoid security issues.

    We could use this gem: https://github.com/neighborland/anchored

    3 votes up 0 votes down
    1. I find this a simple solution and fast to apply.
      And will avoid us having to take care of all the owasp recommendations: https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html

      On the other way it leaves current proposals with links broken, so it breaks compatibility. To keep compatibility we can apply `strip_links` prior to `strip_tags`, and then `auto_link`: auto_link(strip_tags(strip_links(text)))

      1 votes up 0 votes down
    2. @product if you approve at @coditramuntana we go for the bugfix

      0 votes up 0 votes down
      1. cc/ @carol @arnau

        0 votes up 0 votes down
        1. Hi Oliver, yes, go ahead, thanks

          0 votes up 0 votes down
    3. Link to Github, PR: https://github.com/decidim/decidim/pull/5341

      0 votes up 0 votes down
      1. @carol The PR was merged into master. Backport to v0.18 is pending review.

        0 votes up 0 votes down
      2. There are a couple of things that needs some more work but you can see it working here at Meta

        0 votes up 0 votes down

Sign in with your Atmosphere account to comment.