Bug 31219: Prevent JS injection in patron extended attributes
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 25 Jul 2022 07:23:25 +0000 (09:23 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 24 Oct 2022 17:40:41 +0000 (14:40 -0300)
commitb0cf6c087b9e23467b98faecd3eac1ec0d6bc968
tree1046169cd6ddddb66e8143445b04f9d0ffaa51ef
parent57ea65e725f4208274023c4cdc63fd90ab6014ed
Bug 31219: Prevent JS injection in patron extended attributes

We are sanitizing other attributes but "extended patron attributes".

Test plan:
Make a patron attribute editable at the OPAC
Edit an existing patron, or register a new one
Use a script tag in the new value ("<script>alert("booh!")</script>" for
instance)
With this patch the value is remove if containing an HTML tag that is
not br b i em big small strong (see C4::Scrubber)

Signed-off-by: Mark Hofstetter <koha@trust-box.at>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
opac/opac-memberentry.pl