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

Improve report of errors and fix notices #300

Merged
merged 1 commit into from May 3, 2019

Conversation

@Quetzacoalt91
Copy link
Member

Quetzacoalt91 commented Apr 24, 2019

PR content:

  • When an ajax requests fails the security checks, we set its code as 401.
  • Better retrieval of the dir parameter
  • When extracting files from a zip file, report the concerned file in case of failure
  • Split error messages when upgrading languages
@Quetzacoalt91 Quetzacoalt91 changed the base branch from master to dev Apr 24, 2019
@Quetzacoalt91 Quetzacoalt91 added this to the 4.8.0 milestone Apr 24, 2019
@@ -44,6 +44,7 @@
ob_clean();
}
echo '{wrong token}';
http_response_code(401);

This comment has been minimized.

Copy link
@PierreRambaud

PierreRambaud Apr 30, 2019

Contributor

since php 5.4.
maybe prefer?

header('HTTP/1.1 401 Unauthorized');

This comment has been minimized.

Copy link
@Quetzacoalt91

Quetzacoalt91 Apr 30, 2019

Author Member

The module is compatible with PHP 5.6 minimum, so we're fine.

However, I have no idea which solution is better.

This comment has been minimized.

Copy link
@Quetzacoalt91

Quetzacoalt91 Apr 30, 2019

Author Member

It looks they basically have the same result. HTTP 401 will be properly set by PHP: https://github.com/php/php-src/blob/fc42ac2d78e28134bc46ef58c289586a0907dd79/main/http_status_codes.h#L46

This comment has been minimized.

Copy link
@PierreRambaud

PierreRambaud May 3, 2019

Contributor

Oh my bad, thinking it was 5.2+ because of 1.6 compliance ^^

@Quetzacoalt91 Quetzacoalt91 merged commit fbe2251 into PrestaShop:dev May 3, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Quetzacoalt91 Quetzacoalt91 deleted the Quetzacoalt91:feedback-improvements branch May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.