Skip to content

Conversation

@waazdakka
Copy link

…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

…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>
@waazdakka waazdakka requested a review from Altahrim as a code owner December 15, 2024 17:24
Copy link
Member

@joshtrichards joshtrichards left a 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).

@joshtrichards joshtrichards added this to the Nextcloud 31 milestone Dec 24, 2024
@github-actions
Copy link

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

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.)

<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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants