Bug 6629 : Sanitizing input from language cookie
authorChris Cormack <chrisc@catalyst.net.nz>
Fri, 25 Nov 2011 06:07:28 +0000 (19:07 +1300)
committerPaul Poulain <paul.poulain@biblibre.com>
Fri, 25 Nov 2011 09:56:04 +0000 (10:56 +0100)
commit9a4e9e54f26b0c1bf69c5be1f5b0fea93134c06a
treec60db1283e1b049a601d14e4a8311db5ce050d7e
parentfd949453e86b2def06b471a3b3bfa293bce78a75
Bug 6629 : Sanitizing input from language cookie

I dont think we can use only 2 digits, some languages is much longer
zh-hans-TW for example

But the regex should stop it bening able handle nasty chars,
whitelisting safe ones instead

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I checked the patch doesn't break language switching and language selection.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
I confirm the bug security issue was not here for master, but this fix improve the behaviour, so pushing it
C4/Templates.pm