- Issue created by @SamLerner
- Open on Drupal.org βCore: 10.0.7 + Environment: PHP 7.4 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - @samlerner opened merge request.
- Status changed to Needs review
over 1 year ago 8:54pm 2 May 2023 - Status changed to RTBC
over 1 year ago 4:47pm 9 August 2023 - π§πͺBelgium BramDriesen Belgium π§πͺ
Sure why not. The chance of this happening is slim, but good to have it covered none the less since it's outputting plain user input.
- πΊπΈUnited States SamLerner
Agreed, this came up as part of a security audit, so even if normal folks wouldn't find it and exploit it, other security scans might pick up on it.
- Status changed to Needs work
about 1 year ago 10:29pm 18 October 2023 - π΅πΉPortugal jcnventura
Correct me if I'm wrong, but what I believe this code is doing is to escape the challenge, and store it escaped in state, and then get the escaped value from state and again escape it... It works fine as long, as the challenge doesn't include anything that gets escaped.. The moment the challenge includes an escpaed character, let's say
hello"goodbye
, it will be stored in state as
hello"goodbye
, then retrieved and the challenge to be displayed would be
hello"goodbye
. Clearly not what we want. I'm not sure if a quote is a valid challenge character, but I don't see any reason why it would not be.
Would be way better to use https://api.drupal.org/api/drupal/core%21modules%21editor%21src%21Editor...
- Open on Drupal.org βCore: 10.1.4 + Environment: PHP 7.4 & MySQL 5.7last update
about 1 year ago Waiting for branch to pass - Status changed to Needs review
about 1 year ago 2:29pm 20 October 2023 - πΊπΈUnited States SamLerner
I pushed an update that switches to using
Standard::filterXss
. I wasn't sure what filter format would make sense to test, since that could vary from site to site, so I just made a dummy one. - Status changed to Needs work
6 months ago 6:26pm 2 June 2024 - π΅πΉPortugal jcnventura
The implemention must be the reverse of the current state of the MR. The filterXss must be called ONLY during the setting of the configuration form. That way, no XSS is inserted into the configuration.
When retrieving the value, it is already XSS-free, so nothing needs to be escaped.