Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enh/fix] Use ynh_print_* helpers / Upgrade to 0.1.0-beta.7.2 and fix upgrade tests #110

Merged
merged 6 commits into from Dec 1, 2018

Conversation

tituspijean
Copy link
Member

@tituspijean tituspijean commented Nov 11, 2018

馃悰 This is a security upgrade.

Official documentation about this security fix requires the user to manually enter the password database in the /admin page. As it consists in a simple POST action, I used a curl call to automatically perform it.
鈿狅笍 However, to perform this curl call with auto-signed certificates, I had to add the -k (accept all certificates) to the command. I consider the risk low, as the $domain curl reaches to is hosted by the same server.


While testing, I discovered some overlooks in the upgrade script that I fixed:

  • check that upgrade actually occurred before upgrading the app's parameters
  • fix the test logic for Flarum (was already fixed for the extension, we forgot to implement it some lines above)

I also added the new ynh_print_* helpers from a previous PR.


Closes #105 #102 #108.

tituspijean added 6 commits September 17, 2018 22:06
[enh] Upgrade to 0.1.0-beta.7.2
[fix] Scripts remembers whether Flarum or its extension were upgraded or not.
[fix] Bad logic test for Flarum versions comparison
Upgrade to version 0.1.0-beta.7.2
@tituspijean tituspijean requested a review from a team November 11, 2018 21:17
if [[ $flarum_version == "0.1.0-beta.7.2"]]; then
curl "https://$domain$path_url/admin" -H "Accept: */*" --compressed -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" --data "databasePassword=$db_pwd"
if [[ $flarum_version == "0.1.0-beta.7.2" ]]; then
curl "https://$domain$path_url/admin" -H "Accept: */*" --compressed -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" --data "databasePassword=$db_pwd" -k
Copy link
Member Author

Choose a reason for hiding this comment

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

I had to add this -k flag to be able to send the POST request to servers with auto-signed certificates. I consider it low-risk, as the request actually won't leave the server.

@tituspijean tituspijean changed the title [enh/enh] Use ynh_print_* helpers / Upgrade to 0.1.0-beta.7.2 and fix upgrade tests [enh/fix] Use ynh_print_* helpers / Upgrade to 0.1.0-beta.7.2 and fix upgrade tests Nov 11, 2018
@frju365
Copy link
Member

frju365 commented Nov 12, 2018

Seems to be fine.I will test this evening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use ynh_print_* helpers
2 participants