in reply to Structuring a Web site and security issues
I've been using CGIwrap for years (probably ~8 now)...
1. I don't think your 'use lib' line is correct. It tells the script to go up a directory, and to try to go up what looks to be the URL path... which are not directories.
On shared systems, I keep my modules in my home directory, and might have a path like '/users/username/lib/perl5/' or similar. (it's outside of the directory that has my CGI scripts, and there's no 'cgiwrap' involved, as that's typically an executable). The folks at the hosting ISP should be able to help you.
2. I keep it in a file w/out group/world read permissions, outside of any location being served by the webserver (which may be in a perl module, as I don't keep those in a servable location). I don't tend to encrypt them, as the decryption routines (and the necessary seed) are all accessible from the machine, so it's just extra work for me to maintain, with little added security (but see answer to #3)
3. I don't believe there is such a thing as 'best practice'. You have to evaluate each situation differently, and determine what the potential benefits and risks are.
Now -- for the comments about CGIwrap itself ... yes, it adds a little overhead to a plain CGI call, so there are tradeoffs. (and it's much slower than mod_perl, or fastCGI). As for the security issues, the ones I know about are not from the main CGIwrap distribution -- they're from a modified version of CGIwrap that was shipped w/ Cobalt Raq servers. (later bought by Sun). There was a more recent report of a format string vulnerability about 2 years ago, but it was unsubstantiated. As with any tool, there are possibilities of misconfiguration (don't allow cgiwrapd to be called from remote subnets)...
The only thing I can think of that might be an issue is the error messages that CGIwrap throws when you have your system mis-configured (ie, it telling you that permissions are wrong, etc), might leak a little too much info to the outside world.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Structuring a Web site and security issues
by bradcathey (Prior) on Dec 26, 2005 at 18:24 UTC | |
by pileofrogs (Priest) on Dec 26, 2005 at 19:31 UTC | |
by bradcathey (Prior) on Dec 26, 2005 at 20:11 UTC |