ginatrapani/ThinkUp — Issue #1166: Cron-generated emails include ThinkUp password
Author: rafeco
Created: 2011-11-18 18:23:13+00:00
State: open

When you set up a Cron job for ThinkUp using the default instructions, you get emails from Cron with something like the following subject:

/srv/www/blah/docs/thinkup/crawler/;export THINKUP_PASSWORD=mypassword; /usr/bin/php crawl.php rafeco@gmail.com

This seems bad to me. This could be fixed by changing the instructions to append "> /dev/null" to the command line for cron to run. That would prevent the email from being sent entirely.

It could also be fixed by having the installer script generate a simple shell script for you to run with cron that does the same thing as the single line that's provided by the instructions now. Then the name of that script would be emailed rather than the command line that includes the password.

Here's the simple script I created:

#!/bin/sh
cd /srv/www/blah/docs/thinkup/crawler/
export THINKUP_PASSWORD=mypassword
/usr/bin/php crawl.php rafeco@gmail.com > thinkup_crawl.log

There are certainly other ways around this as well.

It may also be worth noting that the cron instructions say "Alternately, use the command below to set up a cron job that runs hourly" but the command listed runs the crawler but does not set the time schedule. You can rectify that by just putting an "@hourly" at the front.