Bugzilla – Attachment 170094 Details for
Bug 37573
Restrict OPACSearchForTitleIn token removal to underscore and alphanumeric
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37573: Fix bad escaping in OPACSearchForTitleIn that broke JavaScript in <script> tags in it
Bug-37573-Fix-bad-escaping-in-OPACSearchForTitleIn.patch (text/plain), 1.15 KB, created by
Michał
on 2024-08-06 13:04:05 UTC
(
hide
)
Description:
Bug 37573: Fix bad escaping in OPACSearchForTitleIn that broke JavaScript in <script> tags in it
Filename:
MIME Type:
Creator:
Michał
Created:
2024-08-06 13:04:05 UTC
Size:
1.15 KB
patch
obsolete
>From 6d86ef68d67d07fa8bce1fcb2542c32d50c5e064 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Micha=C5=82=20Kula?= > <148193449+mkibp@users.noreply.github.com> >Date: Tue, 6 Aug 2024 12:45:09 +0000 >Subject: [PATCH] Bug 37573: Fix bad escaping in OPACSearchForTitleIn that > broke JavaScript in <script> tags in it > >The helper Perl function parametrized_url that converted parameters >within {} would actually remove everything between such characters, >regardless of whether they were a correct parameter or any arbitrary >text. > >The patch changes it to remove only something that would look like >a parameter, so that it won't break other unrelated things, while >keeping the original intended behavior. >--- > C4/Output.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Output.pm b/C4/Output.pm >index d8ea0bfb52..84a3789ef7 100644 >--- a/C4/Output.pm >+++ b/C4/Output.pm >@@ -408,7 +408,7 @@ sub parametrized_url { > my $val_url = URI::Escape::uri_escape_utf8( $val // q{} ); > $ret =~ s/\{$key\}/$val_url/g; > } >- $ret =~ s/\{[^\{]*\}//g; # remove remaining vars >+ $ret =~ s/\{[A-Z0-9_]+\}//g; # remove remaining vars > return $ret; > } > >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37573
:
170094
|
173767