Skip to content

Commit 36a86fb

Browse files
committed
chore: fixup index.web.php
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
1 parent 79d2627 commit 36a86fb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

index.web.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,15 @@ public function isAuthenticated(): bool {
576576
<p>To login you need to provide the unhashed value of "updater.secret" in your config file.</p>
577577
<p>If you don't know that value, you can access this updater directly via the Nextcloud admin screen or generate
578578
your own secret:</p>
579-
<code>php -r '$password = trim(shell_exec("openssl rand -base64 48"));if(strlen($password) === 64) {$hash = password_hash($password, PASSWORD_DEFAULT) . "\n"; echo "Insert as \"updater.secret\": ".$hash; echo "The plaintext value is: ".$password."\n";}else{echo "Could not execute OpenSSL.\n";};'</code>
579+
<code>php -r '$password = trim(shell_exec("openssl rand -base64 48"));
580+
if (strlen($password) === 64) {
581+
$hash = password_hash($password, PASSWORD_DEFAULT);
582+
echo "Insert this line in your config.php:\n\n";
583+
echo "'\''updater.secret'\'' => '\''" . $hash . "'\'',\n\n";
584+
echo "The plaintext value is: " . $password . "\n";
585+
} else {
586+
echo "Could not execute OpenSSL.\n";
587+
}'</code>
580588
<form method="post" name="login">
581589
<fieldset>
582590
<input type="password" name="updater-secret-input" value=""

0 commit comments

Comments
 (0)