From: a at b dot c dot de Operating system: PHP version: 5.0.3 PHP Bug Type: Unknown/Other Function Bug description: stream_wrapper_register() allows registering of invalid schemes.
Description: ------------ URL schemes may not contain ":" characters (as this character is used as the scheme delimiter). stream_wrapper_register() will allow "schemes" containing ":" to be registered, even though the URLs that result from using them are invalid. Reproduce code: --------------- <?php class foo_class{ function stream_open(){return true;} } stream_wrapper_register('tick:tock', 'foo_class'); print_r(stream_get_wrappers()); $fp=fopen('tick:tock:thingy','w'); ?> Expected result: ---------------- Warning: stream_wrapper_register(tick:tock): Invalid argument ... on line 5 Array ( [0] => php [1] => file [2] => http [3] => ftp [4] => compress.zlib ) Actual result: -------------- Array ( [0] => php [1] => file [2] => http [3] => ftp [4] => compress.zlib [5] => tick:tock ) Warning: fopen(tick:tock:thingy): failed to open stream: Invalid argument ... on line 7 -- Edit bug report at http://bugs.php.net/?id=32563&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32563&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32563&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32563&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32563&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32563&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32563&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32563&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32563&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32563&r=support Expected behavior: http://bugs.php.net/fix.php?id=32563&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32563&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32563&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32563&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32563&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32563&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32563&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32563&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32563&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32563&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32563&r=mysqlcfg