Bug 12172 - Remote XSLT style sheets fail to fetch under https under recent LWP::Simple
Summary: Remote XSLT style sheets fail to fetch under https under recent LWP::Simple
Status: RESOLVED DUPLICATE of bug 11826
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-01 17:15 UTC by Martin Renvoize
Modified: 2014-09-25 12:08 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 12172: Use LWP::UserAgent for remote XSLT fetch (1.94 KB, patch)
2014-05-01 17:36 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.