https://github.com/matomo-org/matomo/pull/17387 - Mouve

Site d'origine

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

Fix for Apache 2.4+ #17387

Merged
merged 2 commits into from Apr 11, 2021
Merged

Fix for Apache 2.4+ #17387

merged 2 commits into from Apr 11, 2021

Conversation

@jorisdrenth
Copy link
Contributor

@jorisdrenth jorisdrenth commented Mar 24, 2021

Description:

In Apache 2.4+, the syntax for access control has changed. This causes the cron script to return a 500 error when running on Apache 2.4+. This PR checks which version of Apache is used and uses the right syntax.

See also: https://httpd.apache.org/docs/2.4/upgrading.html

Review

  • Functional review done
  • Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
  • Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • Security review done see checklist
  • Code review done
  • Tests were added if useful/possible
  • Reviewed for breaking changes
  • Developer changelog updated if needed
  • Documentation added if needed
  • Existing documentation updated if needed
@flamisz flamisz mentioned this pull request Apr 7, 2021
0 of 10 tasks complete
Copy link
Member

@diosmosis diosmosis left a comment

Hi @jorisdrenth, thanks so much for the contribution! I requested one change, after it's made we'll be able to merge it.

misc/cron/.htaccess Outdated Show resolved Hide resolved
Updated as requested by @diosmosis
@jorisdrenth
Copy link
Contributor Author

@jorisdrenth jorisdrenth commented Apr 11, 2021

Thanks for your comment @diosmosis. I've made the requested changes, also adding the <IfModule !mod_version.c> part which I found in the file you linked. I think this is the most consistent code I can make of it.

I've tested this version of the .htaccess and it works at my client's Matomo installation on our Apache 2.4 servers.

@jorisdrenth jorisdrenth requested a review from diosmosis Apr 11, 2021
@diosmosis
Copy link
Member

@diosmosis diosmosis commented Apr 11, 2021

@jorisdrenth does the mod_version one alone not work for you?

@jorisdrenth
Copy link
Contributor Author

@jorisdrenth jorisdrenth commented Apr 11, 2021

@diosmosis No, it causes an Internal Server Error. mod_version is not available on our servers, that's why we always check for mod_authz_core.

In my opinion this is the best solution to the widest range of users. Also see the comment in the file you linked.

@diosmosis
Copy link
Member

@diosmosis diosmosis commented Apr 11, 2021

Hi @jorisdrenth, you're right, my glance at the file should have been more thorough. Thanks again for the contribution!

@diosmosis diosmosis added this to the 4.3.0 milestone Apr 11, 2021
@diosmosis diosmosis merged commit 308a346 into matomo-org:4.x-dev Apr 11, 2021
1 of 2 checks passed
1 of 2 checks passed
@github-actions
PHPCS
Details
@travis-ci
Travis CI - Pull Request Build Errored
Details
@jorisdrenth jorisdrenth deleted the jorisdrenth:jorisdrenth-patch-htaccess branch Apr 11, 2021
@jorisdrenth
Copy link
Contributor Author

@jorisdrenth jorisdrenth commented Apr 11, 2021

Np, thanks for accepting the PR @diosmosis!

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

Successfully merging this pull request may close these issues.

None yet

3 participants

level de log mis à 1

Récupération du document https://github.com/matomo-org/matomo/pull/17387.

Récupération de l'URL https://github.com/matomo-org/matomo/pull/17387...

Raccourcis

Commandes

Fermer