ioseb / uri-template

PHP extension implementation of RFC-6570(URI Template) in C - https://datatracker.ietf.org/doc/html/rfc6570
http://pecl.php.net/package/uri_template
Other
73 stars 3 forks source link

Null character `\0` terminates strings #7

Open mtdowling opened 10 years ago

mtdowling commented 10 years ago

When using this extension, I ran into the issue that passing a null character \0 will terminate a string before the end of a string is encountered.

php > var_export(uri_template("foo\0bar", []));
'foo'
var_export(uri_template("\0bar", []));
''
// Other characters work correctly
var_export(uri_template("\nbar", []));
'%0Abar'
ioseb commented 10 years ago

@mtdowling i believe i responded to this issue but i do not see my comment... anyway, i'll look at it ASAP. thanks for letting me know!