Bug 12552

Summary: Odd error caused by URI Escape
Product: Koha Reporter: Kyle M Hall <kyle>
Component: PatronsAssignee: Kyle M Hall <kyle>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: gmcharlt, katrin.fischer, kyle.m.hall, mtompset
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 12552 - Odd error caused by URI Escape

Description Kyle M Hall 2014-07-10 18:23:38 UTC
A forward slash (/) in a payment note will trigger the following error:

usi_escape: Unmatched [ in regex; marked by <-- HERE in m/([ <-- HERE ])/ at (eval 133) line 1.

The issue is the use of uri_escape at line 174 of members/pay.pl, where a forward slash is a reserved character.
Comment 1 Kyle M Hall 2014-07-10 18:30:13 UTC
I cannot reproduce the issue, I suspect the issue may be URI::Escape version 3.30. I'm running version 3.31 and do not see the issue.
Comment 2 Kyle M Hall 2015-06-17 15:28:41 UTC
I don't know the source of the error ( and thus cannot reproduce it on demand ) but it doesn't appear to be the forward slash after all.
Comment 3 Kyle M Hall 2015-06-17 15:30:18 UTC
Created attachment 40245 [details] [review]
Bug 12552 - Odd error caused by URI Escape

uri_escape: Unmatched [ in regex; marked by <-- HERE in m/([ <-- HERE ])/ at (eval 133) line 1.

The issue is the use of uri_escape at line 174 of members/pay.pl

Test Plan:
1) Apply this patch
2) Attempt to pay a fine with the "Pay" button
3) No regressions should be noted
Comment 4 Kyle M Hall 2015-06-17 15:30:53 UTC
Upping importance because this bug can prevent payment of fines.
Comment 5 Kyle M Hall 2015-06-17 15:31:55 UTC
I should also note I've seen this bug multiple times but cannot reproduce on a test system. However, the patch does indeed fix the issue on production systems I've applied it to.
Comment 6 Mark Tompsett 2015-06-17 19:54:08 UTC
Problem. I entered $_ as my note, and once saved, the note portion displayed as \$_.
Comment 7 Katrin Fischer 2015-06-18 10:17:10 UTC
Could this be related to bug 8686 - version of URI::Escape?
Comment 8 Mark Tompsett 2015-06-18 18:17:54 UTC
(In reply to Katrin Fischer from comment #7)
> Could this be related to bug 8686 - version of URI::Escape?

I was chatting with Kyle on IRC about this yesterday.
I don't think it is.
http://irc.koha-community.org/koha/2015-06-17#i_1689562
17:53 - 19:52
Comment 9 Kyle M Hall 2015-07-06 14:55:15 UTC
I believe the issue is no longer related to URI::Escape.