Bug #1312
$HTTP["remoteip"] compared to subnet does not work
| Status: | Invalid | Start: | ||
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | core | |||
| Target version: | - | |||
| Pending: | No |
Resolution: | invalid |
|
| Patch available: |
Description
I use lighttpd as a personal webserver and on this server I also have a wiki. I want to block access to the wiki directory for all computers not belonging to my subnet. In lighttpd 1.4.14 and earlier the following worked:
$HTTP["remoteip"] != "192.168.0.0/8" {
$HTTP["url"] =~ "^/wiki/" {
url.access-deny = ( "" )
}
}
But that does no longer work in lighttpd 1.4.16
If I rewrite the check to something like this it will work:
$HTTP["remoteip"] != "192.168.0.20" {
$HTTP["url"] =~ "^/wiki/" {
url.access-deny = ( "" )
}
}
The operating system is Linux 2.6.21.3 running on an AMD64.
-- john.eckerdal
History
08/22/2007 05:44 PM - darix
can you please test if http://zen.sh.nu/~darix/lighttpd-1.4.17.r1956.tar.gz
fixes your problem? this is a 1.4.17 release candidate.
08/23/2007 04:47 PM - Anonymous
With the 1.4.17 release candidate it seems to work as expected.
-- john.eckerdal
08/23/2007 05:20 PM - darix
- Status changed from New to Fixed
- Resolution set to fixed
closing as of last comment.
03/19/2008 09:58 AM - Anonymous
- Status changed from Fixed to Need Feedback
- Resolution deleted (
fixed)
03/19/2008 10:07 AM - Anonymous
hy,
still the same Problem in
ii lighttpd 1.4.19-1 A fast webserver with minimal memory footprint
all unmodified Debian packages.
-- ruben
03/25/2008 10:28 PM - stbuehler
- Status changed from Need Feedback to Fixed
- Resolution set to invalid
You cannot check a subnet mask as a regular expression; use "==" or "!=" to match against subnets.