Bug 832390
| Summary: | perl-Frontier-RPC-Client mishandles proxy settings | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Marko Myllynen <myllynen> | ||||||
| Component: | perl-Frontier-RPC | Assignee: | Petr Pisar <ppisar> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Martin Kyral <mkyral> | ||||||
| Severity: | low | Docs Contact: | Lenka Špačková <lkuprova> | ||||||
| Priority: | low | ||||||||
| Version: | 6.3 | CC: | bnater, cww, jhutar, jorton, ppisar, psabata | ||||||
| Target Milestone: | rc | Keywords: | EasyFix, Patch, Reopened | ||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | perl-Frontier-RPC-0.07b4p1-10.el6 | Doc Type: | Release Note | ||||||
| Doc Text: |
The *Frontier::Client* Perl module no longer ignores proxy settings for HTTPS requests
When using the *Frontier::Client* Perl module to send an XML-RPC request to an HTTPS server through a proxy service, the proxy setting was previously ignored. Consequently, the request was sent directly to the HTTPS server and not through the proxy server. With this update, the *Frontier::Client* Perl module has been corrected to pass the proxy setting to an underlying *LWP::UserAgent* object for both HTTP and HTTPS schemata, and *Frontier::Client* now respects proxy setting also for HTTPS requests.
|
Story Points: | --- | ||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2017-03-21 09:29:52 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 947775, 1070830, 1159820, 1172231, 1254457, 1269194, 1269913, 1359263 | ||||||||
| Attachments: |
|
||||||||
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate, in the next release of Red Hat Enterprise Linux. Quality Engineering Management has reviewed and declined this request. You may appeal this decision by reopening this request. Created attachment 934523 [details]
Possible patch
Add support for a couple more schemes.
Created attachment 1200473 [details]
Fix
This filters supported protocols correctly and it limits the schemata to http and https because XML-RPC is defined on top of HTTP only.
How to test:
(1) Install package providing "perl(Frontier::Client)".
(2) Perform this command:
$ perl -Ilib -MFrontier::Client -e 'Frontier::Client->new(q{url} => q{https://localhost/}, q{proxy} => q{http://localhost:2000/})->call(q{method})'
(3) Check the network traffic or error output.
Before: A TCP connection to localhost:443 is performed, if there is no listening server, error "500 Can't connect to localhost:443 (connect: Connection refused)" is printed to error output.
After: A TCP connection to localhost:2000 is performed, if there is no listening proxt server, error "500 Can't connect to localhost:2000 (connect: Connection refused)" is printed.
Alternatively, you can set up an HTTP proxy and and HTTPS XML-RPC service and check the request is send only via the proxy and not directly.
Bugfix verified in TR#299279: https://tcms.engineering.redhat.com/run/299279/#caserun_14440448 [errata-resolution] Old FAILED & New PASSED => FIXED [result-summary] old-files = FAILED [0-4/4] - failed on all in Test new-files = PASSED [4-0/4] old-avc = PASSED [4-0/4] new-avc = PASSED [4-0/4] old-duration = 0:00:30 [0:00:28 - 0:00:43] new-duration = 0:00:20 [0:00:17 - 0:00:23] Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2017-0605.html |
Description of problem: When creating a new Frontier client with my $client = new Frontier::Client('url' => $url, 'proxy' => $proxy); the proxy setting is used only for the HTTP protocol. In many corporate networks FTP/HTTP/HTTPS connections to the Internet are allowed only via proxies so the newly created Frontier client will fail to contact servers over HTTPS. This is due to the new method in Frontier/Client.pm: $self->{'ua'}->proxy('http', $self->{'proxy'}) if(defined $self->{'proxy'}); Version-Release number of selected component (if applicable): perl-Frontier-RPC-Client-0.07b4p1-9.el6.noarch