Closed rcbarnett-zz closed 11 years ago
Original reporter: ivanr
ivanr: Please review and close.
marcstern: What's the impact of this change on interactions with other modules? For instance, phase:1 was performed before SetEnvIf, RewriteRule, RequestHeader. Is it still the case?
marcstern: > allow for rules that are protecting Apache itself,
but I am yet to see a single such rule What about rules protecting the "scoping", like ".." in URL, invalid UTF-8 encoding, invalid request line, inconsistent content-length and transfer-encoding, ... Doesn't this introduce a risk? What if Apache has a hole in such an area? A rule could have blocked the request.
ivanr: I am going to comment on this because I made this change (long time ago, while I was still actively coding). Because
marcstern: Ivan,
ivanr: Missing responses:
I am not responding to your feature suggestion as I am no longer in charge.
bpinto: Marc,
I agree with you this is now like a fake phase and maybe will break some module inter-communication. As it is a new code and it not clear the real impact of this for the community. I will wait to hear more from community. Revert this change made is a possibility in the future. If not your sub-phase idea can also be a feature to remove the sense of "fake" with these two phases. However i think the sub-phases can confuse users when write rules. I have heard from many users that SecRules are corrently confuse to write. So... i'm thinking in a solution for this.
Thanks
Breno
marcstern: 1. As this is incompatible with 2.5.x, I strongly recommend to revert asap to old behaviour before finding a good solution.
ivanr: 1. Marc, your problem can be easily solved with an introduction of another phase, which would be equivalent to pre-2.6.x phase 1. In that way, ModSecurity would work for you as well as for others (who have suffered from other phase 1 related issues, e.g., no phase 1 rules working in
rbarnett: We need to review this ticket and consider a change back to normal phase:1 - post-read-request.
marcstern: What is the status? Last remark was to change it back. Will it be the case?
Otherwise, I should have missed something ... I understand the concern about simplification, even if it breaks the compatibility. However, we now have a phase 1 that is strictly equivalent to phase 2! Is that a real simplification?
bpinto: Hi Marc,
We have a new configure option : ./configure --enable-request-early
So, you can define what you want : use the same hook for phase 1 and 2 or not.
marcstern: Great
ivanr: The new default in 2.7 is just plain wrong. If anything, the default 2.7 behaviour should have been the same as 2.6, with a configure-time switch for Marc to revert back to the old ways. As it is, we're again seeing users get confused because of the inability to control phase 1 rules from
rbarnett: The default is the same as 2.6 - both phase:1 and phase:2 are in Apache fixup phase which allows controlling setting using Apache scope containers. If the user wants to move phase:1 back to post-read-request Apache hook, they need to use the --enable-request-early configure flag.
ivanr: Then there's a bug in 2.7.2, because I am seeing phase 1 rules executing in the early hook by default.
bpinto: No there is no bug. By default 2.7.x the phase 1 is not is post-read-request (like 2.5.x). Userd must do --enable-request-early=no to run as 2.6.x
MODSEC-98: I have this idea that ModSecurity should not use post_read for its phase 1. Instead, phase 1 should use the same hook as phase 2. With this change, users would be able to override configuration from a