Bug 44901 - [PATCH] Syntax env=! is unsupported in mod_authz_host (env negation)
[PATCH] Syntax env=! is unsupported in mod_authz_host (env negation)
Status: RESOLVED FIXED
Product: Apache httpd-2
Classification: Unclassified
Component: Other Modules
2.2.8
All All
: P3 enhancement (vote)
: ---
Assigned To: Apache HTTPD Bugs Mailing List
: PatchAvailable
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-04-29 02:06 UTC by Roman Shterenzon
Modified: 2008-07-10 06:39 UTC (History)
1 user (show)



Attachments
Support for negation for env vars (901 bytes, patch)
2008-04-29 02:06 UTC, Roman Shterenzon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Shterenzon 2008-04-29 02:06:04 UTC
Created attachment 21878 [details]
Support for negation for env vars

Although mentioned here http://httpd.apache.org/docs/2.2/howto/access.html, actually it's not implemented.
Therefore the directive below has no effect:

Deny from env=!HAS_SOMEVAR

Attached is a patch, which remedies this problem. If, for some reason, this is not fixed, the documentation should be modified to reflect this limitation.
Comment 1 Takashi Sato 2008-04-29 04:38:44 UTC
I think howto/access.html is wrong.
env!= is not mentioned in the module manual. http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html
Comment 2 Joshua Slive 2008-04-29 05:48:07 UTC
But it is supported pretty-much every else that the env= option is available for a directive, so it should be available here too.

Marking as an enhancement request with PatchAvailable.
Comment 3 Roman Shterenzon 2008-04-30 02:07:31 UTC
I consider this issue a bug, since this kind of configuration is explicitly mentioned in authoritative Apache documentation (http://httpd.apache.org/docs/2.2/howto/access.html)
Comment 4 Joshua Slive 2008-04-30 08:08:17 UTC
The classification is irrelevant. (Nobody looks at those fields in bugzilla anyway.) But I'll change it back if it makes you feel better.
Comment 5 Takashi Sato 2008-06-09 07:55:15 UTC
I've modified the document
http://svn.apache.org/viewvc?rev=665707&view=rev

I agree env!= is useful so leave this Open as enhancement request.
Comment 6 Takashi Sato 2008-06-13 14:33:57 UTC
Applied to trunk
http://svn.apache.org/viewvc?rev=667513&view=rev

Backport Proposal
http://svn.apache.org/viewvc?rev=667517&view=rev