perl - Is a plain-text password in a CGI script a security hole? -


i've read things can go wrong web server may lead display of php scripts plain text files in web browser; consequently i've moved of php scripts directory outside web root. i've been wondering whether same happen cgi scripts in cgi-bin.

my main concern 1 script contains user name , password mysql database. if possible security hole (at least far database content concerned), there way of putting sensitive data in different location , getting there (like saving in file in different directory , reading file, example)? scripts written in perl btw.

i've read things can go wrong web server may lead display of php scripts plain text files in web browser; consequently i've moved of php scripts directory outside web root. i've been wondering whether same happen cgi scripts in cgi-bin.

yes. if goes wrong causes programs served instead of executed, of content exposed. same issue php (except given way cgi-bin directories configured (i.e. aliased directory outside web root), harder problems occur).

my main concern 1 script contains user name , password mysql database. if possible security hole (at least far database content concerned), there way of putting sensitive data in different location , getting there (like saving in file in different directory , reading file, example)?

yes. that, make sure directory outside webroot.

for additional security, make sure database accepts credentials connections minimum set of hosts need access it. e.g. if database on same server web server, let credentials work localhost. causing database listen on localhost network interface idea in case.

my scripts written in perl btw.

i'd @ using 1 of config::* modules this.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -