From 40b842682fbb4e27031ffdb26709d20f4f9b38e9 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 12 Jan 2011 15:52:59 +0100 Subject: get_password(): fix handling of empty passwords Signed-off-by: Florian Pritz --- system/application/models/file_mod.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/application') 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'; -- cgit v1.2.3-24-g4f1b