in reply to null character problem

Try the ideas in:

How to avoid Null Byte Injection?

CGI Security and the null byte problem

Extra CGI.pm safety by stripping \x00 bytes?


I'm not really a human, but I play one on earth. Cogito ergo sum a bum

Replies are listed 'Best First'.
Re^2: null character problem
by leonidlm (Pilgrim) on Sep 05, 2007 at 08:38 UTC
    Thank you for you'r reply but I still have a problem with this. The reason is that the while loop stops at this Evil line! The loop is not continuing till the end of the file but stops before, somehow perl thinks this null character is the EOF.
      You need to strip the null byte out before you run it thru the while loop.

      I'm not really a human, but I play one on earth. Cogito ergo sum a bum
        It seems I overcomed this problem by using:
        binmode(LOGFILE);
        Can someone explain why it worked ?