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

[ticket/15851] Automatic update downloader #6544

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CHItA
Copy link
Member

@CHItA CHItA commented Sep 23, 2023

PHPBB3-15851

Checklist:

  • Correct branch: master for new features; 3.3.x for fixes
  • Tests pass
  • Code follows coding guidelines: master and 3.3.x
  • Commit follows commit message format

Tracker ticket:

https://tracker.phpbb.com/browse/PHPBB3-15851

@CHItA CHItA added this to the 4.0.0-a1 milestone Sep 23, 2023
@CHItA CHItA added the WIP 🚧 label Sep 23, 2023
use phpbb\filesystem\exception\filesystem_exception;
use phpbb\filesystem\filesystem_interface;
use SodiumException;
use ZipArchive;
Copy link
Member

Choose a reason for hiding this comment

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

composer should include php-zip as requirement
There is a functions_compress.php in includes folder too that can be used if the server don't have zip installed (or just dont allow updates)

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 doubt that would actually work if this is not working.

*
* @return bool Whether the signature is correct or not.
*/
public function validate(string $file_path, string $signature_path): bool
Copy link
Member

@Derky Derky Sep 24, 2023

Choose a reason for hiding this comment

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

Please return the reason why the signature is not valid so it's possible to solve the error without having to add debug statements everywhere.
(Download doesn't exist, signature doesn't exist, unable to decode base64, what SodiumException occurred)

Copy link
Member Author

Choose a reason for hiding this comment

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

that doesn't really make any sense to me, we only care if the signature is valid or not. Further more, how this is used, it is impossible to not have the file.

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