]> git.koha-community.org Git - koha.git/commit
Bug 17393: Fix non-Latin chars handling in self reg
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 4 Oct 2016 07:29:30 +0000 (08:29 +0100)
committerJulian Maurice <julian.maurice@biblibre.com>
Mon, 24 Oct 2016 10:39:46 +0000 (12:39 +0200)
commitde1c5696e0f8828990c95dbdc0520abb12bf476c
tree688cdaec018056f0cfb1b42ff8eafa2517b50151
parent6efb6830a24555809be7b1cff1faf156f7cb67a2
Bug 17393: Fix non-Latin chars handling in self reg

If you fill the patron self reg with non-latin characters, they will be
encoded with HTML entities (&eacute;)
This bug leads to generate a userid with weird behaviors:
é => eacute
ł => x

Test plan:
0/ Do not apply the patch
1/ Set up the Self reg feature
2/ fill surname, fistname with something like "Michał pouéàç"
3/ Save
4/ See the bad encoding/replacement on the screen and look at the data
The accentued chars are replaced with their html representation and the
non-Latin chars with a 'x'
in the DB
5/ Apply this patch
6/ Repeat steps 2, 3
7/ Everything should be ok
8/ Try to make sure this HTML::Entities escape was not useful:
fill surname with "surname <script>alert("xss?")</script>"
Save and look at the data

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 35de8aa1ef07b04cfc7c977f7168cd36b40d7941)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e25934f6cdb1eaae0fbc9be15afe55a3ee2ad51a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
opac/opac-memberentry.pl