Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 24 lines (20 sloc) 0.744 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
from base import *
from os import system

MAGIC = "Allow From range invalid"

CONF = """
vserver!1!rule!770!match = directory
vserver!1!rule!770!match!directory = /allow_range3
vserver!1!rule!770!match!final = 0
vserver!1!rule!770!allow_from = 123.123.0.0/16,0102::/16
"""

class Test (TestBase):
    def __init__ (self):
        TestBase.__init__ (self, __file__)
        self.name = "Allow from invalid range"
        self.request = "GET /allow_range3/file HTTP/1.0\r\n"
        self.expected_error = 403
        self.forbidden_content = MAGIC
        self.conf = CONF

    def Prepare (self, www):
        self.Mkdir (www, "allow_range3")
        self.WriteFile (www, "allow_range3/file", 0444, MAGIC)
Something went wrong with that request. Please try again.