From: SourceForge.net <no...@so...> - 2012-07-10 22:52:05
|
Bugs item #3537101, was opened at 2012-06-22 01:20 Message generated for change (Settings changed) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=547455&aid=3537101&group_id=76550 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Web tester Group: None >Status: Open Resolution: Works For Me Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: Perrick Penet (pp11) Summary: web form issues due to post fields being truncated Initial Comment: I have been having trouble getting a login working using the the browser module, this is only happening on one particular server which is RHEL6 - php 5.3.13. Basically the login fails, with the remote server rejecting the request. On closer inspection, the post parameters appear to be truncated. i.e there is a validation key that should be "/wEWBgKg39dCAtHo2bAJAoCO7/gFAraE6F8CoejZkAICz5yEggoKjWoDPyV4u4qbEbtGzIJvWG8IkA==" but simpletest appears to be sending the following in the post instead ""/wEWBgKg39dCAtHo2bAJAoCO7/gFAraE6F8CoejZkAICz5yEggoKjWoDPyV4u4qbEbtGzIJvWG8IkA" It appears the the '=' characters are being stripped off by mergeAttributes() in tidy_parser.php, however it also appears that the unaffected machines do not take this code path. ---------------------------------------------------------------------- >Comment By: https://www.google.com/accounts () Date: 2012-07-10 15:52 Message: indeed, your given test case fails on the affected machine. See result below. 6) Field [Text A] should match with [Field expectation [String: /wEWBgKg39dCAtHo2bAJAoCO7/gFAraE6F8CoejZkAICz5yEggoKjWoDPyV4u4qbEbtGzIJvWG8IkA==] fails with [String: "/wEWBgKg39dCAtHo2bAJAoCO7/gFAraE6F8CoejZkAICz5yEggoKjWoDPyV4u4qbEbtGzIJvWG8IkA] at character 0 with [/wEWBgKg39dCAtHo2bAJAoCO7/gFAraE6F8CoejZkAICz5yEggoKjWoDPyV4u4qbEbtGzIJvWG8IkA==] and ["/wEWBgKg39dCAtHo2bAJAoCO7/gFAraE6F8CoejZkAICz5yEggoKjWoDPyV4u4qbEbtGzIJvWG8IkA]] at [/home/dart/trunk/test/acceptance_test.php line 1086] in testSubmissionOfTrickyPostValue in LiveTestOfForms 7) Text [wEWBgKg39dCAtHo2bAJAoCO7/gFAraE6F8CoejZkAICz5yEggoKjWoDPyV4u4qbEbtGzIJvWG8IkA==] not detected in [String: Simple test target file A target for the SimpleTest test suite. Request Protocol versionHTTP/1.0 Request methodPOST Accept header Cookies Raw GET data [] GET data Dump of $_GET data Array ( ) Raw POST...] at [/home/dart/trunk/test/acceptance_test.php line 1089] in testSubmissionOfTrickyPostValue in LiveTestOfForms ---------------------------------------------------------------------- Comment By: Perrick Penet (pp11) Date: 2012-07-01 06:04 Message: I tried to replicate your bug with the following patch : ### Eclipse Workspace Patch 1.0 #P simpletest Index: test/acceptance_test.php =================================================================== --- test/acceptance_test.php (revision 2050) +++ test/acceptance_test.php (working copy) @@ -1079,6 +1079,13 @@ $this->assertText("i=[']"); } + function testSubmissionOfTrickyPostValue() { + $this->get($this->samples() . 'form_with_tricky_post_value.html'); + $this->assertField('Text A', '/wEWBgKg39dCAtHo2bAJAoCO7/gFAraE6F8CoejZkAICz5yEggoKjWoDPyV4u4qbEbtGzIJvWG8IkA=='); + $this->click('Go!'); + $this->assertText("wEWBgKg39dCAtHo2bAJAoCO7/gFAraE6F8CoejZkAICz5yEggoKjWoDPyV4u4qbEbtGzIJvWG8IkA=="); + } + function testFormActionRespectsBaseTag() { $this->get($this->samples() . 'base_tag/form.html'); $this->assertTrue($this->clickSubmit('Go!')); Index: test/site/form_with_tricky_post_value.html =================================================================== --- test/site/form_with_tricky_post_value.html (revision 0) +++ test/site/form_with_tricky_post_value.html (revision 0) @@ -0,0 +1,10 @@ +<html> + <head><title>Test of form submission</title></head> + <body> + <form action="network_confirm.php" method="post"> + <label>Text A <input type="text" name="a" value="/wEWBgKg39dCAtHo2bAJAoCO7/gFAraE6F8CoejZkAICz5yEggoKjWoDPyV4u4qbEbtGzIJvWG8IkA=="></label> + <br /> + <input type="submit" value="Go!"> + </form> + </body> +</html> \ No newline at end of file Property changes on: test/site/form_with_tricky_post_value.html ___________________________________________________________________ Added: svn:executable + * But things are looking OK on my machine. Maybe you could elaborate on this code to provide a failing test case and we can find the root cause more easily. Thanks in advance, Perrick ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=547455&aid=3537101&group_id=76550 |