|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-12-29 22:29 UTC] stephanvanruth at gmail dot com
Description:
------------
Crash when a string longer than 225 characters (while containing @) is passed to filter_var
Test script:
---------------
filter_var('the-total-length@of-an-entire-address.cannot-be-longer-than-two-hundred-and-fifty-four-characters.and-this-address-is-254-characters-exactly.so-it-should-be-valid.and-im-going-to-add-some-more-words-here.to-increase-the-lenght-blah-blah-blah-blah-bla.org', FILTER_VALIDATE_EMAIL);
Expected result:
----------------
return the input given
Actual result:
--------------
crash
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 02:00:01 2025 UTC |
t.php: <?php $mail = filter_var('the-total-length@of-an-entire-address.cannot-be-longer-than-two-hundred-and-fifty-four-characters.and-this-address-is-254-characters-exactly.so-it-should-be-valid.and-im-going-to-add-some-more-words-here.to-increase-the-lenght-blah-blah-blah-blah-bla.org', FILTER_VALIDATE_EMAIL); file_put_contents('test.txt', $mail); ?> Success! test.txt has been created and contains the given string. works with both: php t.php php -n t.php Thnx for this, whenever I 'think' I have found a bug, I will try this first. I'm gonna google "Apache stack too small" now. Happy New Year! Stephan