View Single Post
Old 10-26-2005, 08:44 PM  
phpslave
Confirmed User
 
Join Date: Jan 2003
Location: San Jose
Posts: 548

Unexpected character in input: ' ' (ASCII=1) state=2 in .....

Seems to be a big vBulliten error do a google search for it all that shows up is vBulliten boards.

i was able to reproduce the problem, but don't have access to vBulliten code.

PHP Code:
<?php
 file_put_contents
('/test.php''<?php'.chr(1));
 
?>
or

PHP Code:
<?php 
eval(chr(1)); 
?>
The problem occurs where lower ascii characters in the php input stream so somewhere in your php file, there is a character (ASCII value of 1) which if you run one of the above samples, will produce;

PHP Warning: Unexpected character in input: 'hahaha9786;' (ASCII=1) state=1 in /var/www/htdocs/test.php on line 1

The Real Question is:
The real question is why are they eval()ing at all, there is no reason to use eval() in production code. just about the only legitimate use of eval() is making mock objects for testing.

they being vBulletin
__________________

phpslave is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote