From:             
Operating system: Windows XP
PHP version:      5.3.10
Package:          *Regular Expressions
Bug Type:         Bug
Bug description:Regexp crashes http server

Description:
------------
Regular expression crashes http server. It's all because character < at the
beginning of te string.

Test script:
---------------
<?php

$string = '< PASS_COUNT; i++) { if (strcmp(password, PASSWD2) == 0)
continue;        } c++; if (c == 3) break; }     // Tu wlasciwe sprawdzanie 
hasla
}dku gdy liczy sie wydajnosc, gdyz petle zabieraja niestety troche czasu :(
ale jest to niewiele i w sumie to nie czuc roznicy. Kolejna sprawa jest
sposob porownywania hasla. NIGDY nie dokonuj deszyfracji klucza w programie
(mam nadzieje ze chociaz szyfrujesz klucze :)). Jest to pierwsza i
najwazniejsza zasada ! Wiec jak sprawdzic czy wprowadzony klucz jest
poprawny. Zaszyfruj go i porownaj zaszyfrowane klucze. Ktos kto sledzi Twoj
program ma wtedy utrudnione zadanie, a gdy poprawny klucz jest deszyfrowany
to ktos sobie przejdzie do momentu az klucz bedzie zdeszyforwany i tylko go
spisze. Od metody szyfracji zalezy bezpieczenstwo Twojego programu wiec
staraj sie dobierac algorytm, ktory dobrze szyfruje (nie mowie tu o
Triple-DES itp. ;) ). Marzeniem bylby algorytm jednostronny, ktorego
odszyfrowania jest trudniejsze niz brute-force ale na to nie licz.
Najlepiej ';
preg_match('~(</?)(\w*)((/(?!>)|[^/>])*)(/?>)~', $string, $matches);

?>

Expected result:
----------------
Blank page.

Actual result:
--------------
Apache fails.

-- 
Edit bug report at https://bugs.php.net/bug.php?id=61068&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=61068&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=61068&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=61068&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=61068&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=61068&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=61068&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=61068&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=61068&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=61068&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=61068&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=61068&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=61068&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=61068&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=61068&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=61068&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=61068&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=61068&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=61068&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=61068&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=61068&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=61068&r=mysqlcfg

Reply via email to