]> git.p6c8.net - jirafeau_mojo42.git/commitdiff
Merge remote-tracking branch 'origin/master'
authorWeblate <noreply@weblate.org>
Fri, 26 Aug 2016 21:14:13 +0000 (23:14 +0200)
committerWeblate <noreply@weblate.org>
Fri, 26 Aug 2016 21:14:13 +0000 (23:14 +0200)
admin.php
install.php

index 62fd5eee86eacbc8b3c9a7eb9adc30b6a5e00387..bfbd123be74372fc578da4852db2e96f0a601e5c 100644 (file)
--- a/admin.php
+++ b/admin.php
@@ -70,7 +70,8 @@ else
   /* Check classic admin password authentification. */
   if (isset ($_POST['admin_password']) && empty($cfg['admin_http_auth_user']))
   {
-      if ($cfg['admin_password'] === $_POST['admin_password'])
+      if ($cfg['admin_password'] === $_POST['admin_password'] ||
+         $cfg['admin_password'] === hash('sha256', $_POST['admin_password']))
           $_SESSION['admin_auth'] = true;
       else
       {
index c537bdd5d6661b4fa01e17f59594ed20b02556b9..958aa1eef5809d4a80680cfb6d2b421bedb30420 100644 (file)
@@ -166,7 +166,7 @@ if (isset ($_POST['step']) && isset ($_POST['next']))
         break;
 
     case 2:
-        $cfg['admin_password'] = $_POST['admin_password'];
+        $cfg['admin_password'] = hash('sha256', $_POST['admin_password']);
         jirafeau_export_cfg ($cfg);
         break;
 

patrick-canterino.de