-
Couldn't load subscription status.
- Fork 2k
fix: filter exec order #7955
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: filter exec order #7955
Conversation
edd373d to 48e8303 Compare 48e8303 to 8c32823 Compare | For Route filters and Filters filters that specify before and after at the same time, the order of execution in the after filters has been reversed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making this a feature flag. I think we should move away from the "Filters include" way of configuring these.
| @MGatner What do you mean by the "Filters include" way? |
| @kenjis see |
| 👋 Hi, @kenjis! |
22fd8fe to a1eb57a Compare | 👋 Hi, @kenjis! |
a1eb57a to 3d943e1 Compare | Rebased to resolve a conflict. |
3d943e1 to 7687855 Compare
Description
Supersedes #7404
The globals before filters should be applied first.
CSRF filter or Auth filter is often defined as globals before filter, and they should run first.
The current order of execution is different from what developers normally assume, and thus may cause security issues.
See https://forum.codeigniter.com/showthread.php?tid=86619, codeigniter4/shield#798
Config\Feature::$oldFilterOrderfor backward compatibility(1)
before filters:
after filters:
(2)
Configuration
Previous:
Now:
Ref #6262
Checklist: