Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Security issues if used on a server' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Security issues if used on a server
Authored by: Erik Toh on Nov 25, '02 10:01:30PM

This should be OK if it's meant to be used as a stand-alone machine and not at the server-level. There are at least 2 security-related problems with this script:

1) The password to the MySQL database is written in plaintext and the script is set to world-readable. A slightly better idea is to put it in ~/bin and set it to execute only. Of course if connecting over a network the MySQL password would have to be encrypted as well.

2) There is no check on /tmp/sql_excel.tmp. Someone could stick a macro virus in there or make use of race conditions to change the legitimate file with a doctored one (previously proven to work on Linux, not sure on OS X though). Again, it's safer to do stuff in your own home directory.



[ Reply to This | # ]
Security issues if used on a server
Authored by: Erik Toh on Nov 25, '02 10:26:51PM

Additional point. The SQL commands are not validated. Someone could just type this:

sql_excel "DROP DATABASE xxx"

And it would get executed.



[ Reply to This | # ]