From 70f12a69d400f6d7388307b761d0e610644017a5 Mon Sep 17 00:00:00 2001 From: mxmehl Date: Fri, 10 Jul 2015 14:07:17 +0300 Subject: [PATCH] further password disclosure avoidance --- action.sh | 2 +- submit.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/action.sh b/action.sh index 50f0c4a..4cef8b4 100755 --- a/action.sh +++ b/action.sh @@ -31,7 +31,7 @@ source config.cfg ACTION="$1" # adduser, changepw, listusers, userdetail, deluser, sizeall, sizeuser, viewdata USER="$2" -PASS=$(cat "$3") +PASS=$(cat "$3") # $3 is a file containing the password ## FUNCTIONS function checkaction { diff --git a/submit.php b/submit.php index 765539a..f8cb516 100644 --- a/submit.php +++ b/submit.php @@ -34,7 +34,7 @@ file_put_contents($PASSFILE, $PASS); if($SURE == "yes") { // Creates full command - $command = '/bin/bash action.sh ' . $ACTION . ' ' . $USER . ' ' . $PASS; + $command = '/bin/bash action.sh ' . $ACTION . ' ' . $USER . ' ' . $PASSFILE; // Execute command and give output $output = shell_exec($command);