Can't match string containing a quote

Created on 3 October 2024, 3 months ago

Problem/Motivation

It looks like 🐛 XSS vulnerability in facet results Fixed broke matching on strings containing a quote.

Steps to reproduce

  1. Have a facet result with a label l'infini.
  2. Type l: it finds it.
  3. Type l': it does not find it.

It seems to be because it tries comparing l' and l'.

Proposed resolution

I see 2 ways to fix this:

  • Stop escaping the labels in drupalSettings and instead rework the JS to stop using innerHTML and use safe DOM methods instead.
  • Unescape the entities before matching the string.
🐛 Bug report
Status

Active

Version

2.2

Component

Code

Created by

🇫🇷France prudloff Lille

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024