Bug 19110 - XSS Stored in branches.pl
Summary: XSS Stored in branches.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major
Assignee: Amit Gupta
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks: 14568
  Show dependency treegraph
 
Reported: 2017-08-15 09:23 UTC by Amit Gupta
Modified: 2019-10-14 19:58 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 19110 - XSS Stored in branches.pl (4.84 KB, patch)
2017-08-15 09:36 UTC, Amit Gupta
Details | Diff | Splinter Review
[SIGNED OFF] Bug 19110 - XSS Stored in branches.pl (4.91 KB, patch)
2017-08-16 09:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19110 - XSS Stored in branches.pl (4.99 KB, patch)
2017-08-16 11:39 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Gupta 2017-08-15 09:23:32 UTC
1. JS executing while deleting the branch
/cgi-bin/koha/admin/branches.pl?op=delete_confirm&branchcode=[branchcode]
2. JS executing while creating the new group.
/cgi-bin/koha/admin/branches.pl?op=add_form_category
Comment 1 Amit Gupta 2017-08-15 09:36:06 UTC
Created attachment 66003 [details] [review]
Bug 19110 - XSS Stored in branches.pl

To Test
1. Hit the page /cgi-bin/koha/admin/branches.pl?op=add_form_category
2. Add a text in the field Name and description that contains js.
3. Save the page.
4. Notice js is execute
5. Apply patch and reload, the js is escaped

Fixed for js escaped execute for both pages

1. /cgi-bin/koha/admin/branches.pl?op=delete_confirm&branchcode=xx
   xx is branchcode
2. /cgi-bin/koha/admin/branches.pl?op=add_form with Group(s):
Comment 2 Katrin Fischer 2017-08-16 09:16:10 UTC
Created attachment 66051 [details] [review]
[SIGNED OFF] Bug 19110 - XSS Stored in branches.pl

To Test
1. Hit the page /cgi-bin/koha/admin/branches.pl?op=add_form_category
2. Add a text in the field Name and description that contains js.
3. Save the page.
4. Notice js is execute
5. Apply patch and reload, the js is escaped

Fixed for js escaped execute for both pages

1. /cgi-bin/koha/admin/branches.pl?op=delete_confirm&branchcode=xx
   xx is branchcode
2. /cgi-bin/koha/admin/branches.pl?op=add_form with Group(s):

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 3 Marcel de Rooy 2017-08-16 11:39:51 UTC
Created attachment 66077 [details] [review]
Bug 19110 - XSS Stored in branches.pl

To Test
1. Hit the page /cgi-bin/koha/admin/branches.pl?op=add_form_category
2. Add a text in the field Name and description that contains js.
3. Save the page.
4. Notice js is execute
5. Apply patch and reload, the js is escaped

Fixed for js escaped execute for both pages

1. /cgi-bin/koha/admin/branches.pl?op=delete_confirm&branchcode=xx
   xx is branchcode
2. /cgi-bin/koha/admin/branches.pl?op=add_form with Group(s):

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Jonathan Druart 2017-08-29 15:07:45 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 5 Fridolin Somers 2017-09-05 12:43:22 UTC
Pushed to 17.05.x, is in 17.05.03
Comment 6 Katrin Fischer 2017-09-07 06:13:52 UTC
This patch has been pushed to 16.11.x and is in 16.11.11.
Comment 7 Mason James 2017-09-20 02:41:14 UTC
Pushed to 16.05.x, for 16.05.16 release - thanks Amit :0)