Bug 495102 - piranha removes slashes from monitoring script send commands
Summary: piranha removes slashes from monitoring script send commands
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: piranha
Version: 5.3
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Marek Grac
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 497828
TreeView+ depends on / blocked
 
Reported: 2009-04-09 18:31 UTC by John Ruemker
Modified: 2009-09-02 11:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 497828 (view as bug list)
Environment:
Last Closed: 2009-09-02 11:58:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch (1.89 KB, patch)
2009-04-27 13:28 UTC, Marek Grac
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1396 0 normal SHIPPED_LIVE piranha bug-fix update 2009-09-01 12:01:44 UTC

Description John Ruemker 2009-04-09 18:31:35 UTC
Description of problem: When editing a virtual service, any slash entered in the Send box will be removed when written to the configuration.  The default Send command contains slashes, so simply leaving it as-is and hitting Accept will result in HTTP/1.0rnrn as opposed to HTTP/1.0\r\n\r\n.  This in turn results in nanny timing out waiting for the real server to respond, when it never will because it didn't receive the two carriage returns.  

This is caused by the unnecessary stripslashes call in web/web/secure/virtual_edit_services.php:

       $send           = stripslashes($_GET['send']);



Version-Release number of selected component (if applicable): piranha-0.8.4-11.el5

How reproducible: Always

Steps to Reproduce:
1. Create a new virtual server or edit an existing one
2. Go to the Monitoring Scripts tab
3. Enter value (or leave defaults) of "GET / HTTP/1.0\r\n\r\n"
4. Hit Accept
  
Actual results: lvs.cf has 'send = "GET / HTTP/1.0rnrn"'

Expected results: lvs.cf has 'send = "GET / HTTP/1.0\r\n\r\n"'

Additional info: This issue was fixed in RHEL 4 by BZ 199243.

Comment 1 Marek Grac 2009-04-27 13:28:21 UTC
Created attachment 341428 [details]
Patch

Situation is slightly more complicated. Usage of stripslashes() is not useless when php is configured with 'magic_quotes_gpc = On'. Attached patch should work with both of the situations.

Comment 4 errata-xmlrpc 2009-09-02 11:58:31 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1396.html


Note You need to log in before you can comment on or make changes to this bug.