in reply to request for review: file reading security
Yeah. As written, the user could pass, e.g., ../topsecretpages/index.html and start looking at the topsecretpages directory that exists at the same level as pages. (Of course, the user would have to guess or learn the name of the directory, and it is to be hoped you don't really have top secret pages lying around under your web server's document root without any protection.)
Updated: Like the followups say, the regexp dealt with that. Teach me to answer SoPWs in the middle of the night...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: request for review: file reading security
by Anonymous Monk on Sep 05, 2004 at 14:33 UTC | |
by pbeckingham (Parson) on Sep 05, 2004 at 14:58 UTC | |
by Chady (Priest) on Sep 05, 2004 at 15:57 UTC |