in reply to Security with open() in CGI scripts
Ok, whats the problem? CGI passes user_input=rfp, and the script tries to open rfp.db. (Lets ignore the ../../ stuff for now). Then it got interesting when I passed 'user_input=rfp%00'. Perl made $database="rfp\0.db", and then tried to open $database. The results?# parse $user_input $database="$user_input.db"; open(FILE "<$database");
Update: I had intended to credit the author, RainForestPuppy, phrack mag 55-7. Sorry for the slip-up.
Tata
SMiTZ
Added update per user request - dvergin 2002-02-26
|
|---|