Commit a07d75d
committed
fix(modulesadmin): escape dirname and image at HTML output point
The earlier commit removed early htmlspecialchars() on $dirname to fix
the DB lookup bug, but left the img src output point unescaped. If a
module dirname or image filename contained quotes or angle brackets,
the raw interpolation into the src attribute would be an XSS vector.
Escape both $dirname and $module->getInfo('image') at the two HTML
output sites (lines 657 and 871 in xoops_module_install and
xoops_module_update) using htmlspecialchars() with ENT_QUOTES |
ENT_HTML5. The dirname stays raw for all internal operations (DB
lookup, filesystem, cache clearing).1 parent 63e8ba9 commit a07d75d
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
657 | | - | |
| 657 | + | |
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
| |||
868 | 868 | | |
869 | 869 | | |
870 | 870 | | |
871 | | - | |
| 871 | + | |
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
| |||
0 commit comments