Bug 19108 - Stored XSS in authtypes.pl
authorAmit Gupta <amit.gupta@informaticsglobal.com>
Tue, 15 Aug 2017 08:36:47 +0000 (13:36 +0530)
committerKatrin Fischer <katrin.fischer.83@web.de>
Tue, 19 Sep 2017 21:10:47 +0000 (23:10 +0200)
To Test
1. Hit the page /cgi-bin/koha/admin/authtypes.pl?op=add_form
2. Add a text in the field Description that contains js
3. Save the page.
4. Notice js is execute
5. Apply patch and reload, the js is escaped

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bc780f588bc908f8b1d0da8987b20914996d942c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 520388dc1d6f3e0e6ada332cf232784e4e737834)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt

index 7cad110..3b83e6f 100644 (file)
         [% FOREACH authority_type IN authority_types %]
             <tr>
                 <td>[% authority_type.authtypecode %]</td>
-                <td>[% authority_type.authtypetext %]</td>
-                <td>[% authority_type.summary %]</td>
+                <td>[% authority_type.authtypetext |html %]</td>
+                <td>[% authority_type.summary |html %]</td>
                 <td>[% authority_type.auth_tag_to_report %]</td>
                 <td>
                   <div class="dropdown">