Bug 38470: Add missing double quotes to some Javascript

This change adds some double quotes where quotes were missing,
and replaces single quotes with double quotes, which prevents XSS.

Test plan:
0. Apply the patch
1. Create a subscription
2. Using the ID from the subscription, go to this page:
http://localhost:8081/cgi-bin/koha/serials/subscription-detail.pl?
print_routing_list_issue=1&subscriptionid=<SUBSCRIPTIONID>

3. Note that you're able to generate a print slip
(You may need to allow popups)

4. To check the security vulnerability is fixed, try the proof-of-concepts
attached to the bug report

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
David Cook 2024-11-18 05:15:26 +00:00 committed by Paul Derscheid
parent ef9053aae2
commit 852254b3cc
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
1 changed files with 2 additions and 2 deletions

View File

@ -452,7 +452,7 @@
$(document).ready(function() {
$("#renewsub").click(function(){
popup([% subscriptionid | html %]);
popup("[% subscriptionid | html %]");
return false;
})
@ -498,7 +498,7 @@
$("#show_all_orders").click();
[% IF print_routing_list_issue %]
var myurl = '/cgi-bin/koha/serials/routing-preview.pl?op=print&subscriptionid=[% subscriptionid | uri %]&issue=[% print_routing_list_issue | uri %]';
var myurl = "/cgi-bin/koha/serials/routing-preview.pl?op=print&subscriptionid=[% subscriptionid | uri %]&issue=[% print_routing_list_issue | uri %]";
window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
[% END %]