Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.3

Bug #16321 Problem with backslash in docs/test_Text_Wiki.php
Submitted: 2009-06-13 02:48 UTC
From: rodrigosprimo Assigned:
Status: Bogus Package: Text_Wiki (version CVS)
PHP Version: Irrelevant OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2009-06-13 02:48 UTC] rodrigosprimo (Rodrigo Sampaio Primo)
Description: ------------ The script test_Text_Wiki.php does not handle properly backslashes in the input. I'm attaching a patch that apparently solve the issue but I haven't tested it very well. Test script: --------------- Input to test_Text_Wiki.php: /----------------------\ Expected result: ---------------- /----------------------\ Actual result: -------------- /----------------------\\

Comments

 [2009-06-13 02:54 UTC] rodrigosprimo (Rodrigo Sampaio Primo)
I wasn't able to properly add the patch (possibly because of a temporary problem on PEAR system) so I'm sending the patch code below: RCS file: /repository/pear/Text_Wiki/doc/test_Text_Wiki.php,v retrieving revision 1.19 diff -r1.19 test_Text_Wiki.php 80c80 < $result = $wiki->transform($source, $render); --- > $result = $wiki->transform(stripslashes($source), $render); 115c115 < $_REQUEST['source'] = htmlspecialchars($_REQUEST['source']); --- > $_REQUEST['source'] = htmlspecialchars(stripslashes($_REQUEST['source']));
 [2009-06-13 06:17 UTC] justinpatrin (Justin Patrin)
-Status: Open +Status: Bogus
This is not a bug in Text_Wiki. You need to turn off magic_quotes_gpc in your php.ini.
 [2009-06-15 22:34 UTC] rodrigosprimo (Rodrigo Sampaio Primo)
Thanks Justin, maybe it is a good idea to add a warning on the script to make things easy for new Text_Wiki users like me. I'm adding a new patch with a suggestion to achieve that. What do you think?
 [2009-06-15 22:36 UTC] rodrigosprimo (Rodrigo Sampaio Primo)
The following patch has been added/updated: Patch Name: warning_for_users_about_magic_quotes_gpc Revision: 1245087379 URL: http://pear.php.net/bugs/patch-display.php?bug=16321&patch=warning_for_users_about_magic_quotes_gpc&revision=1245087379&display=1
 [2009-06-16 00:00 UTC] justinpatrin (Justin Patrin)
Sounds good.
 [2009-06-16 09:19 UTC] rodrigosprimo (Rodrigo Sampaio Primo)
Done!