-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update index.php to allow users to just copy paste the line on the co… #592
base: master
Are you sure you want to change the base?
Conversation
…nfig.php file The initial syntax used double quotes and two points which is not the correct syntax in the config.php file instead of simple quote and "=>". This proposition to allow users to just copy paste the line into their config.php file Signed-off-by: waazdakka <raphael.piedallu@live.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
Just one change required: The index.php
doesn't get modified directly. So this edit needs to be made in index.web.php
instead of index.php
(then run make index.php
).
[The index.php
file is a byproduct of the build process and the change show up in there after.]
If you want I can do it for you (not sure if you have an actual dev environment setup for the updater or not).
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
@@ -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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<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.
…nfig.php file
The initial syntax used double quotes and two points which is not the correct syntax in the config.php file instead of simple quote and "=>". This proposition to allow users to just copy paste the line into their config.php file