[feladat @ 271]
Password of Poweradmin administrator is now asked (and used) during installation procedure, avoiding the need of using a default password.
--- a/docs/i18n-template-php.pot Thu May 15 21:50:20 2008 +0000
+++ b/docs/i18n-template-php.pot Fri May 16 10:01:42 2008 +0000
@@ -872,7 +872,10 @@
msgstr ""
#: index.php:213
-msgid "After you have removed the directory, you can login to <a href=\"index.php\">Poweradmin</a> with username \"admin\" and password \"admin\". You are highly encouraged to change these as soon as you are logged in."
+msgid "After you have removed the directory, you can login to <a href=\"index.php\">Poweradmin</a> with username \"admin\" and password \""
+msgstr ""
+
+msgid "\". You are highly encouraged to change these as soon as you are logged in."
msgstr ""
msgid "Invalid value for name field of SRV record."
@@ -890,4 +893,11 @@
msgid "Invalid characters have been used in this record."
msgstr ""
+msgid "Poweradmin administrator password"
+msgstr ""
+msgid "The password of the Poweradmin administrator. This administrator has full rights to Poweradmin using the web interface."
+msgstr ""
+
+
+
--- a/install/database-structure.inc.php Thu May 15 21:50:20 2008 +0000
+++ b/install/database-structure.inc.php Fri May 16 10:01:42 2008 +0000
@@ -281,7 +281,7 @@
);
$def_remaining_queries = array(
- "INSERT INTO users VALUES (1,'admin','21232f297a57a5a743894a0e4a801fc3','Administrator','admin@example.net','Administrator with full rights.',1,1)",
+ "INSERT INTO users VALUES (1,'admin'," . $db->quote(md5($pa_pass)) . ",'Administrator','admin@example.net','Administrator with full rights.',1,1)",
"INSERT INTO perm_templ VALUES (1,'Administrator','Administrator template with full rights.')",
"INSERT INTO perm_templ_items VALUES (249,1,53)"
);
--- a/install/index.php Thu May 15 21:50:20 2008 +0000
+++ b/install/index.php Fri May 16 10:01:42 2008 +0000
@@ -113,6 +113,11 @@
"</td>\n";
echo " <td>" . _('The type of the PowerDNS database.') . "</td>\n";
echo " </tr>\n";
+ echo " <tr>\n";
+ echo " <td>" . _('Poweradmin administrator password') . "</td>\n";
+ echo " <td><input type=\"text\" name=\"pa_pass\" value=\"\"></td>\n";
+ echo " <td>" . _('The password of the Poweradmin administrator. This administrator has full rights to Poweradmin using the web interface.') . "</td>\n";
+ echo " </tr>\n";
echo "</table>\n";
echo "<input type=\"hidden\" name=\"step\" value=\"" . $step . "\">";
echo "<input type=\"hidden\" name=\"language\" value=\"" . $language . "\">";
@@ -124,16 +129,17 @@
$step++;
echo "<p>" . _('Updating database...') . " ";
include_once("../inc/config-me.inc.php");
- include_once("database-structure.inc.php");
$db_user = $_POST['user'];
$db_pass = $_POST['pass'];
$db_host = $_POST['host'];
$db_name = $_POST['name'];
$db_type = $_POST['type'];
+ $pa_pass = $_POST['pa_pass'];
require_once("../inc/database.inc.php");
$db = dbConnect();
$db->loadModule('Manager');
$db->loadModule('Extended');
+ include_once("database-structure.inc.php");
$current_tables = $db->listTables();
foreach ($def_tables as $table) {
if (in_array($table['table_name'], $current_tables)) $db->dropTable($table['table_name']);
@@ -179,6 +185,7 @@
echo "<input type=\"hidden\" name=\"db_host\" value=\"" . $db_host . "\">";
echo "<input type=\"hidden\" name=\"db_name\" value=\"" . $db_name . "\">";
echo "<input type=\"hidden\" name=\"db_type\" value=\"" . $db_type . "\">";
+ echo "<input type=\"hidden\" name=\"pa_pass\" value=\"" . $pa_pass . "\">";
echo "<input type=\"hidden\" name=\"step\" value=\"" . $step . "\">";
echo "<input type=\"hidden\" name=\"language\" value=\"" . $language . "\">";
echo "<input type=\"submit\" name=\"submit\" value=\"" . _('Go to step') . " " . $step . "\">";
@@ -192,6 +199,7 @@
$db_host = $_POST['db_host'];
$db_name = $_POST['db_name'];
$db_type = $_POST['db_type'];
+ $pa_pass = $_POST['pa_pass'];
$dns_hostmaster = $_POST['dns_hostmaster'];
$dns_ns1 = $_POST['dns_ns1'];
$dns_ns2 = $_POST['dns_ns2'];
@@ -221,6 +229,7 @@
echo "<input type=\"hidden\" name=\"db_type\" value=\"" . $db_type . "\">";
echo "<input type=\"hidden\" name=\"db_user\" value=\"" . $db_user . "\">";
echo "<input type=\"hidden\" name=\"db_pass\" value=\"" . $db_pass . "\">";
+ echo "<input type=\"hidden\" name=\"pa_pass\" value=\"" . $pa_pass . "\">";
echo "<input type=\"hidden\" name=\"dns_hostmaster\" value=\"" . $dns_hostmaster . "\">";
echo "<input type=\"hidden\" name=\"dns_ns1\" value=\"" . $dns_ns1 . "\">";
echo "<input type=\"hidden\" name=\"dns_ns2\" value=\"" . $dns_ns2 . "\">";
@@ -232,6 +241,7 @@
case 6:
$step++;
+ $pa_pass = $_POST['pa_pass'];
$config = "<?php\n\n" .
"\$db_host\t\t= \"" . $_POST['db_host'] . "\";\n" .
"\$db_user\t\t= \"" . $_POST['db_user'] . "\";\n" .
@@ -258,6 +268,7 @@
echo "</pre>";
};
echo "<form method=\"post\">";
+ echo "<input type=\"hidden\" name=\"pa_pass\" value=\"" . $pa_pass . "\">";
echo "<input type=\"hidden\" name=\"step\" value=\"" . $step . "\">";
echo "<input type=\"hidden\" name=\"language\" value=\"" . $language . "\">";
echo "<input type=\"submit\" name=\"submit\" value=\"" . _('Go to step') . " " . $step . "\">";
@@ -267,7 +278,7 @@
case 7:
$step++;
echo "<p>" . _('Now we have finished the configuration, you should (must!) remove the directory "install/" from the Poweradmin root directory. You will not be able to use Poweradmin if it exists. Do it now.') . "</p>";
- echo "<p>" . _('After you have removed the directory, you can login to <a href="index.php">Poweradmin</a> with username "admin" and password "admin". You are highly encouraged to change these as soon as you are logged in.') . "</p>";
+ echo "<p>" . _('After you have removed the directory, you can login to <a href="index.php">Poweradmin</a> with username "admin" and password "') . $_POST['pa_pass'] . _('". You are highly encouraged to change these as soon as you are logged in.') . "</p>";
break;
default:
Binary file locale/nl_NL/LC_MESSAGES/messages.mo has changed
--- a/locale/nl_NL/LC_MESSAGES/nl.po Thu May 15 21:50:20 2008 +0000
+++ b/locale/nl_NL/LC_MESSAGES/nl.po Fri May 16 10:01:42 2008 +0000
@@ -934,8 +934,12 @@
msgstr "De configuratie is afgerond. U moet nu de directory \"install/\" uit de Poweradmin hoofd directory verwijderen. U kunt geen gebruik maken van Poweradmin als deze directory bestaat."
#: index.php:213
-msgid "After you have removed the directory, you can login to <a href=\"index.php\">Poweradmin</a> with username \"admin\" and password \"admin\". You are highly encouraged to change these as soon as you are logged in."
-msgstr "Nadat u de directory hebt verwijderd kunt u op <a href=\"index.php\">Poweradmin</a> inloggen met gebruikersnaam \"admin\" en het wachtwoord \"admin\". U wordt zeer aangeraden deze direct te wijzigen."
+msgid "After you have removed the directory, you can login to <a href=\"index.php\">Poweradmin</a> with username \"admin\" and password \""
+msgstr "Nadat u de directory hebt verwijderd kunt u op <a href=\"index.php\">Poweradmin</a> inloggen met gebruikersnaam \"admin\" en het wachtwoord \""
+
+#: index.php:213
+msgid "\". You are highly encouraged to change these as soon as you are logged in."
+msgstr "\". U wordt zeer aangeraden deze direct te wijzigen."
msgid "Invalid value for name field of SRV record."
@@ -953,5 +957,8 @@
msgid "Invalid characters have been used in this record."
msgstr "U heeft ongeldige characters gebruikt in het record."
+msgid "Poweradmin administrator password"
+msgstr "Wachtwoord van Poweradmin beheerder"
-
+msgid "The password of the Poweradmin administrator. This administrator has full rights to Poweradmin using the web interface."
+msgstr "Het wachtwoord van de Poweradmin beheerder. Deze beheerder heeft via de web interface alle rechten in Poweradmin."