[PHP-BUG] Bug #52990 [NEW]: PHP crash when PCRE exceed recursion limit.
From: Operating system: *nix PHP version: 5.2.14 Package: PCRE related Bug Type: Bug Bug description:PHP crash when PCRE exceed recursion limit. Description: Hello, I've got "Zero Sized Reply" when I try to replace a long string with PCRE. Test script: --- Expected result: blank page Actual result: -- ERROR The requested URL could not be retrieved While trying to retrieve the URL: *** The following error was encountered: Zero Sized Reply Squid did not receive any data for this request. Your cache administrator is ***. Generated Tue, 05 Oct 2010 05:28:19 GMT by *** (squid/2.7.STABLE3) -- Edit bug report at http://bugs.php.net/bug.php?id=52990&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52990&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52990&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52990&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52990&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52990&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52990&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52990&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52990&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52990&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52990&r=support Expected behavior: http://bugs.php.net/fix.php?id=52990&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52990&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52990&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52990&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52990&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=52990&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52990&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52990&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52990&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52990&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52990&r=mysqlcfg
Bug #50847 [Com]: strip_tags() fails with extremely long tags (attributes)
Edit report at http://bugs.php.net/bug.php?id=50847&edit=1 ID: 50847 Comment by: sarun37823 at bigfoot dot com Reported by: grayson at levy dot org dot il Summary: strip_tags() fails with extremely long tags (attributes) Status: Closed Type: Bug Package: Strings related Operating System: * PHP Version: 5.*, 6 New Comment: http://th.php.net/ChangeLog-5.php#5.2.13  greater then 1023 bytes should change to greater than 1023 bytes  Previous Comments: [2010-02-01 12:59:21] il...@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. [2010-02-01 12:59:09] s...@php.net Automatic comment from SVN on behalf of iliaa Revision: http://svn.php.net/viewvc/?view=revision&revision=294303 Log: Fixed bug #50847 (strip_tags() removes all tags greater then 1023 bytes long) [2010-01-26 17:18:19] j...@php.net It doesn't matter what the tag is. Or what it contains. Single char repeated enough times will make a mess.. [2010-01-26 15:06:38] grayson at levy dot org dot il Description: strip_tags() removes long param tags even when param is in the exclude list. Reproduce code: --- $var = "http://www.whitehouse.gov/videos/2010/January/011910_FallsChurchVA.m4v&path_to_plugins=http://www.whitehouse.gov/sites/default/modules/wh_multimedia/wh_jwplayer/plugins&path_to_player=http://www.whitehouse.gov/sites/all/modules/swftools/shared/flash_media_player&skin=http://www.whitehouse.gov/sites/all/modules/swftools/shared/flash_media_player/skins/EOP_skin.swf&captions_url=http://www.whitehouse.gov/sites/default/files/av_closedcaption/011910_Race_to_the_Top_for_Education_Reform.srtI=http://www.whitehouse.gov/sites/default/files/audio-video/video_thumbnail/P011910LJ-0100-3_0.jpg&controlbar=bottom&frontcolor=AA&plugins=http://www.whitehouse.gov/sites/default/modules/wh_multimedia/wh_jwplayer/plugins/privacy/privacy,http://www.whitehouse.gov/sites/default/modules/wh_multimedia/wh_jwplayer/plugins/hat/hat,http://www.whitehouse.gov/sites/default/modules/wh_multimedia/wh_jwplayer/plugins/share/share,http://www.whitehouse.gov/sites/default/modules/wh_multimedia/w h_jwplayer/plugins/captions/captions&captions.file=http://www.whitehouse.gov/sites/default/files/av_closedcaption/011910_Race_to_the_Top_for_Education_Reform.srt\"; name=\"flashvars\" />"; $var = strip_tags($var, ""); Expected result: $var should be unchanged. Actual result: -- $var is empty. -- Edit this bug report at http://bugs.php.net/bug.php?id=50847&edit=1
#50618 [Opn]: php crashed when preg_replace on some case.
ID: 50618 User updated by: sarun37823 at bigfoot dot com Reported By: sarun37823 at bigfoot dot com Status: Open Bug Type: PCRE related Operating System: Linux PHP Version: 5.2.12 New Comment: I just test code above with php 5.2.5 on WinXP It's work fine. Previous Comments: [2009-12-31 07:43:42] sarun37823 at bigfoot dot com Add: I think it's about * in (?:.(?!made an edit|<\/?li))* Main Idea of this regular expression is to replace to with no li tag inside and with "made an edit" string [2009-12-31 07:17:57] sarun37823 at bigfoot dot com if there's no in test file or i just replace with It can work properly. [2009-12-31 06:11:21] sarun37823 at bigfoot dot com Description: I use preg_replace It work fine for most subject(data) except one. Reproduce code: --- http://www.greatduo.da.ru/files/phpbug1.data $page_c=preg_replace('/]*>(?:.(?!made an edit|<\/?li))*.made[^<>]*<\/div><\/li>/sim', '', $page_c); ?> Expected result: blank page Actual result: -- Error: Zero Sized Reply -- Edit this bug report at http://bugs.php.net/?id=50618&edit=1
#50618 [Opn]: php crashed when preg_replace on some case.
ID: 50618 User updated by: sarun37823 at bigfoot dot com Reported By: sarun37823 at bigfoot dot com Status: Open Bug Type: PCRE related Operating System: Linux PHP Version: 5.2.12 New Comment: Add: I think it's about * in (?:.(?!made an edit|<\/?li))* Main Idea of this regular expression is to replace to with no li tag inside and with "made an edit" string Previous Comments: [2009-12-31 07:17:57] sarun37823 at bigfoot dot com if there's no in test file or i just replace with It can work properly. [2009-12-31 06:11:21] sarun37823 at bigfoot dot com Description: I use preg_replace It work fine for most subject(data) except one. Reproduce code: --- http://www.greatduo.da.ru/files/phpbug1.data $page_c=preg_replace('/]*>(?:.(?!made an edit|<\/?li))*.made[^<>]*<\/div><\/li>/sim', '', $page_c); ?> Expected result: blank page Actual result: -- Error: Zero Sized Reply -- Edit this bug report at http://bugs.php.net/?id=50618&edit=1
#50618 [Opn]: php crashed when preg_replace on some case.
ID: 50618 User updated by: sarun37823 at bigfoot dot com Reported By: sarun37823 at bigfoot dot com Status: Open Bug Type: PCRE related Operating System: Linux PHP Version: 5.2.12 New Comment: if there's no in test file or i just replace with It can work properly. Previous Comments: [2009-12-31 06:11:21] sarun37823 at bigfoot dot com Description: I use preg_replace It work fine for most subject(data) except one. Reproduce code: --- http://www.greatduo.da.ru/files/phpbug1.data $page_c=preg_replace('/]*>(?:.(?!made an edit|<\/?li))*.made[^<>]*<\/div><\/li>/sim', '', $page_c); ?> Expected result: blank page Actual result: -- Error: Zero Sized Reply -- Edit this bug report at http://bugs.php.net/?id=50618&edit=1
#50618 [NEW]: php crashed when preg_replace on some case.
From: sarun37823 at bigfoot dot com Operating system: Linux PHP version: 5.2.12 PHP Bug Type: PCRE related Bug description: php crashed when preg_replace on some case. Description: I use preg_replace It work fine for most subject(data) except one. Reproduce code: --- http://www.greatduo.da.ru/files/phpbug1.data $page_c=preg_replace('/]*>(?:.(?!made an edit|<\/?li))*.made[^<>]*<\/div><\/li>/sim', '', $page_c); ?> Expected result: blank page Actual result: -- Error: Zero Sized Reply -- Edit bug report at http://bugs.php.net/?id=50618&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50618&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50618&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50618&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50618&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50618&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50618&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50618&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50618&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50618&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50618&r=support Expected behavior: http://bugs.php.net/fix.php?id=50618&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50618&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50618&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50618&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50618&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50618&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50618&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50618&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50618&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50618&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50618&r=mysqlcfg