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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor update.php #44

Closed
J0WI opened this issue Jan 30, 2018 · 4 comments
Closed

Refactor update.php #44

J0WI opened this issue Jan 30, 2018 · 4 comments

Comments

@J0WI
Copy link
Contributor

J0WI commented Jan 30, 2018

The "update.php" should be refactored to adress the following issues:

  • CURLOPT_SSL_VERIFYPEER is disabled, which is insecure
  • SHA1 checksum is also insecure and should be replaced by somewhat stronger (current API does only provide MD5 and SHA1)
  • I think a shell script is preferable over PHP
@mbabker
Copy link
Contributor

mbabker commented Jan 30, 2018

CURLOPT_SSL_VERIFYPEER is disabled, which is insecure

I think that was me just being in a rush or tooling on my system being outdated, definitely no excuse for that other than bad developer.

SHA1 checksum is also insecure and should be replaced by somewhat stronger (current API does only provide MD5 and SHA1)

Our downloads platform is a modified version of Akeeba Release System which only supports those hashing methods. Pending acceptance of joomla/joomla-cms#17619 it'll need to be updated anyway to support the hash mechanisms used in that PR (sha256, sha384, and sha512). Once that's all in place then we can use stronger hashes for checksum.

I think a shell script is preferable over PHP

Agreed. But, I'm not as well versed with shell scripts as I am PHP so I went with what I knew (admittedly a lot of the shell scripting in place now is copy/paste from other resources with modifications for the workflow used here).

@mbabker
Copy link
Contributor

mbabker commented Jan 30, 2018

The other point on a PHP script is I do more of the maintenance work on this repo from a MacBook and that causes some issues compared to other Linux platforms (I have to run the generate-stackbrew-library.sh file to generate the info to update the official images repo while tunneled into a Linux system because the readlink function throws errors on Mac).

@J0WI
Copy link
Contributor Author

J0WI commented Jan 30, 2018

I removed CURLOPT_SSL_VERIFYPEER in #46

@J0WI
Copy link
Contributor Author

J0WI commented Jun 3, 2018

PHP is replaced by shell in #63.

@mbabker mbabker closed this as completed Jul 5, 2018
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

No branches or pull requests

2 participants