Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -1796,7 +1796,7 @@ public function isAuthenticated(): bool {
<p>To login you need to provide the unhashed value of "updater.secret" in your config file.</p>
<p>If you don't know that value, you can access this updater directly via the Nextcloud admin screen or generate
your own secret:</p>
<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>
<code>php -r '$password = trim(shell_exec("openssl rand -base64 48"));if(strlen($password) === 64) {$hash = password_hash($password, PASSWORD_DEFAULT); echo "Insert this line in your config.php: \n\n'" 'updater.secret' => '"'.$hash'"',\n\n"'"; echo "The plaintext value is: ".$password."\n";;}else{echo "Could not execute OpenSSL.\n";};'</code>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<code>php -r '$password = trim(shell_exec("openssl rand -base64 48"));if(strlen($password) === 64) {$hash = password_hash($password, PASSWORD_DEFAULT); echo "Insert this line in your config.php: \n\n'" 'updater.secret' => '"'.$hash'"',\n\n"'"; echo "The plaintext value is: ".$password."\n";;}else{echo "Could not execute OpenSSL.\n";};'</code>
<code>php -r '$password = trim(shell_exec("openssl rand -base64 48"));if(strlen($password) === 64) {$hash = password_hash($password, PASSWORD_DEFAULT); echo "Insert this line in your config.php: \n\n'" 'updater.secret' => '"'.$hash'"',\n\n"'"; echo "The plaintext value is: ".$password."\n";}else{echo "Could not execute OpenSSL.\n";};'</code>

There is an extra ; which is not needed.
Also, as Josh said the changes need to happen in index.web.php.

<form method="post" name="login">
<fieldset>
<input type="password" name="updater-secret-input" value=""
Expand Down