aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions_upgrade.php
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2008-11-22 23:34:58 +0000
committerpatdenice <patdenice@piwigo.org>2008-11-22 23:34:58 +0000
commita1e6ae0f159e9cae29683078e358e10d7675badd (patch)
tree53ff5832b9d3d4176f9f748ebc4a24696d3b76dc /admin/include/functions_upgrade.php
parentb75ddb8e9adaaedc3b451ff1e7a502537e445655 (diff)
merge -c2900 from trunk to branch 2.0.
- Bug fixed: username or password with accented character are now accepted for upgrade. - Simplify query in pwg_session_write function. - Retrieve data with cURL method in fetchRemote function now work with forwarded URL. git-svn-id: http://piwigo.org/svn/branches/2.0@2901 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/include/functions_upgrade.php')
-rw-r--r--admin/include/functions_upgrade.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/admin/include/functions_upgrade.php b/admin/include/functions_upgrade.php
index 65b0a21ed..01ffb75b8 100644
--- a/admin/include/functions_upgrade.php
+++ b/admin/include/functions_upgrade.php
@@ -141,7 +141,13 @@ function check_upgrade_access_rights($current_release, $username, $password)
$username = mysql_real_escape_string($username);
}
- if (version_compare($current_release, '1.5.0', '<'))
+ if (version_compare($current_release, '2.0', '<'))
+ {
+ $username = utf8_decode($username);
+ $password = utf8_decode($password);
+ }
+
+ if (version_compare($current_release, '1.5', '<'))
{
$query = '
SELECT password, status
@@ -166,7 +172,7 @@ WHERE '.$conf['user_fields']['username'].'="'.$username.'"
$conf['pass_convert'] = create_function('$s', 'return md5($s);');
}
- if ($row['password'] != $conf['pass_convert']($_POST['password']))
+ if ($row['password'] != $conf['pass_convert']($password))
{
array_push($page['errors'], l10n('invalid_pwd'));
}