1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-21 16:13:00 +00:00

Update the hash action to display algorithm name from settings

This commit is contained in:
Starbeamrainbowlabs 2018-05-10 23:38:11 +01:00
parent 2a24066d7b
commit e0f53fccc7
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
4 changed files with 8 additions and 7 deletions

View file

@ -5,6 +5,7 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
## Changed
- Password hashing has been overhauled! A totally new-and-different system is being used now, so you'll need to rehash all your passwords.
- The `hash` action supports the new password hashing scheme.
- The `css` setting will now keep a value of auto, even when `peppermint.json` is automatically updated by _Pepperminty Wiki_.
## v0.16

View file

@ -387,7 +387,7 @@ THEMECSS;
/////////////////////////////////////////////////////////////////////////////
/** The version of Pepperminty Wiki currently running. */
$version = "v0.17-dev";
$commit = "41ea63281c23c29c5730cbad90e7f085c59717e8";
$commit = "2a24066d7b21a1e678f2882fc21b9130b9bc9d1a";
/// Environment ///
/** Holds information about the current request environment. */
$env = new stdClass();
@ -2136,7 +2136,7 @@ function has_statistic($stat_id) {
register_module([
"name" => "Password hashing action",
"version" => "0.6",
"version" => "0.7",
"author" => "Starbeamrainbowlabs",
"description" => "Adds a utility action (that anyone can use) called hash that hashes a given string. Useful when changing a user's password.",
"id" => "action-hash",
@ -2176,7 +2176,7 @@ register_module([
}
else
{
exit(page_renderer::render_main("Hashed string", "<p>Algorithm: " . ($settings->use_sha3 ? "sha3" : "sha256") . "</p>\n<p><code>" . $_GET["string"] . "</code> → <code>" . hash_password($_GET["string"]) . "</code></p>"));
exit(page_renderer::render_main("Hashed string", "<p>Algorithm: <code>$settings->password_algorithm</code></p>\n<p><code>" . $_GET["string"] . "</code> → <code>" . hash_password($_GET["string"]) . "</code></p>"));
}
});
}

View file

@ -1,11 +1,11 @@
[
{
"name": "Password hashing action",
"version": "0.6",
"version": "0.7",
"author": "Starbeamrainbowlabs",
"description": "Adds a utility action (that anyone can use) called hash that hashes a given string. Useful when changing a user's password.",
"id": "action-hash",
"lastupdate": 1465757909,
"lastupdate": 1525991817,
"optional": false
},
{

View file

@ -1,7 +1,7 @@
<?php
register_module([
"name" => "Password hashing action",
"version" => "0.6",
"version" => "0.7",
"author" => "Starbeamrainbowlabs",
"description" => "Adds a utility action (that anyone can use) called hash that hashes a given string. Useful when changing a user's password.",
"id" => "action-hash",
@ -41,7 +41,7 @@ register_module([
}
else
{
exit(page_renderer::render_main("Hashed string", "<p>Algorithm: " . ($settings->use_sha3 ? "sha3" : "sha256") . "</p>\n<p><code>" . $_GET["string"] . "</code> → <code>" . hash_password($_GET["string"]) . "</code></p>"));
exit(page_renderer::render_main("Hashed string", "<p>Algorithm: <code>$settings->password_algorithm</code></p>\n<p><code>" . $_GET["string"] . "</code> → <code>" . hash_password($_GET["string"]) . "</code></p>"));
}
});
}