Bug 12172

Summary: Remote XSLT style sheets fail to fetch under https under recent LWP::Simple
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: Architecture, internals, and plumbingAssignee: Galen Charlton <gmcharlt>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: m.de.rooy
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11826
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 12172: Use LWP::UserAgent for remote XSLT fetch

Description Martin Renvoize 2014-05-01 17:15:08 UTC
Recent versions of LWP::Simple enable 'verify_hostname' by default.

This breaks https get requests in a nasty way such that any page relying upon the stylesheet results in a nasty perl error.

We should be using LWP::UserAgent and setting this ignorance explicitly, or even better, setting a 'Certificate Authority' path to enable proper hostname verification.
Comment 1 Martin Renvoize 2014-05-01 17:36:57 UTC
Created attachment 27899 [details] [review]
Bug 12172: Use LWP::UserAgent for remote XSLT fetch

This patch re-enables proper handling of https hosted remote xslt
style sheets with recent releases of LWP (libwww-perl-5.837 and
prior do not need this patch).
Comment 2 Martin Renvoize 2014-05-01 17:39:27 UTC
Initial patch cleans up code a little, and swaps from LWP::Simple to LWP::UserAgent to allow for explicit declaration of ssl options.

It then disables verify_hostname to do the 'get'.

I could not, in my testing come up with a reasonable solution to set CA Certificate path to use with the module.
Comment 3 Martin Renvoize 2014-05-06 08:43:30 UTC
This may not be required given bug 11826.  Just testing that it works OK in there.
Comment 4 Martin Renvoize 2014-05-08 13:15:30 UTC
Fixed as a side effect of bug 11826

*** This bug has been marked as a duplicate of bug 11826 ***
Comment 5 Marcel de Rooy 2014-09-25 12:08:32 UTC
Martin,
I will probably reuse a little bit of your code here in bug 12758.