Commit 8ba2020
Security: escape language original name to prevent stored XSS
Refs GHSA-j9jg-h6cw-jj7v
The admin language list rendered the stored original_name directly inside an
input value attribute (and a label / table cell) without HTML-attribute
encoding, so a name containing a double quote could break out of the value
attribute and inject an event handler that runs in another admin's browser.
Encode the value with htmlspecialchars(..., ENT_QUOTES, 'UTF-8') at every
render point of original_name.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 3bc465d commit 8ba2020
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
285 | 286 | | |
286 | 287 | | |
287 | | - | |
| 288 | + | |
288 | 289 | | |
289 | | - | |
| 290 | + | |
290 | 291 | | |
291 | 292 | | |
292 | 293 | | |
293 | | - | |
| 294 | + | |
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
| |||
0 commit comments