summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2011-01-12 15:52:59 +0100
committerFlorian Pritz <bluewind@xssn.at>2011-01-12 15:52:59 +0100
commit40b842682fbb4e27031ffdb26709d20f4f9b38e9 (patch)
tree76921f6e0bb26b7dc653e53855a23020563269c8 /system
parent08dc976431b632e89a72cdf8edc4d7aee6479988 (diff)
get_password(): fix handling of empty passwords
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'system')
-rw-r--r--system/application/models/file_mod.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/application/models/file_mod.php b/system/application/models/file_mod.php
index 30b170e3e..48ae5696b 100644
--- a/system/application/models/file_mod.php
+++ b/system/application/models/file_mod.php
@@ -83,9 +83,9 @@ class File_mod extends Model {
function get_password()
{
$password = $this->input->post('password');
- if ($password !== false) {
+ if ($password !== false && $password !== "") {
return $this->hash_password($password);
- } elseif (isset($_SERVER['PHP_AUTH_PW']) && $_SERVER['PHP_AUTH_PW'] != '') {
+ } elseif (isset($_SERVER['PHP_AUTH_PW']) && $_SERVER['PHP_AUTH_PW'] !== '') {
return $this->hash_password($_SERVER['PHP_AUTH_PW']);
}
return 'NULL';