Forum Moderators: phranque

Message Too Old, No Replies

<RequireAll>, </RequireAll> are not okay?

syntax checker Lyxx

         

klaus100

8:59 am on Jul 24, 2022 (gmt 0)

Top Contributors Of The Month



When one inserts the following, simple syntax in Lyxx
<IfModule mod_authz_core.c>
<RequireAll>
Require all granted
Require not ip 24.178.156.240
</RequireAll>
</IfModule>

Lyxx is creatinf the following message:
Lyxx found 2 problems in the code segment(s) below.

<RequireAll> and </RequireAll> are red.

This is the used URL for Lyxx:
[lyxx.com...]

Is Lyxx right, that the above mentionend syntax is not okay?
Many thanks in advance for your answers.

w3dk

1:24 pm on Jul 24, 2022 (gmt 0)

10+ Year Member Top Contributors Of The Month



Is Lyxx right, that the above mentionend syntax is not okay?


No, it would not appear to be.

The "RequireAll" directive is required here, otherwise it will default to "RequireAny" and that IP address will be permitted access.

not2easy

2:20 pm on Jul 24, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



There is no way to guess what version of Apache that free tool is checking against so I would not rely on its advice. When you have uncertainty about things like this you can ask here and that is also free but it is based on understanding the environment involved rather than making assumptions.

There is free stuff all over the internet and a lot of it is worth its price. ;)

phranque

12:00 am on Jul 25, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



AllowOverride AuthConfig must be active, and the <RequireAll> must be in .htaccess or in directory context.

w3dk

12:00 am on Jul 25, 2022 (gmt 0)

10+ Year Member Top Contributors Of The Month



There is no way to guess what version of Apache that free tool is checking against


It would seem to tend towards Apache 2.2, however, "Require all granted" and "Require not ip ..." are Apache 2.4 variations and they do not throw an error.

FWIW that "tool" would seem to be a very rudimentary checker - it doesn't really check "syntax" at all, just whether the directive itself is recognised?!

lucy24

4:50 am on Jul 25, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



AllowOverride AuthConfig must be active, and the <RequireAll> must be in .htaccess or in directory context.
But I doubt that a rudimentary online paste-in tool would be able to check for those ... which of course is part of the problem.

<tangent>
If none of the directives contained within the <RequireAll> directive fails, and at least one succeeds, then the <RequireAll> directive succeeds. If none succeed and none fail, then it returns a neutral result. In all other cases, it fails.
Perhaps it is just too close to bedtime, but I can't think of a directive that would neither succeed nor fail.
</tangent>

klaus100

4:50 pm on Jul 25, 2022 (gmt 0)

Top Contributors Of The Month



Many thanks for the answer! I conclude that syntax is okay and that Lyxx is not reliable in this case.
How I can close this thread?

lucy24

5:01 pm on Jul 25, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You don't need to take any action. Threads close themselves.