Skip to content
This repository
Newer
Older
100644 30 lines (23 sloc) 0.698 kb
b93cefa9 »
2011-05-17 Improves how faulty CGI executions were handled. For instance, when a
1 from base import *
2
3 MAGIC = "This is the magic string"
4
5 DIR = "cgi-bin-perms1"
6 CONF = """
7 vserver!1!rule!2860!match = directory
8 vserver!1!rule!2860!match!directory = /%(DIR)s
9 vserver!1!rule!2860!handler = cgi
10 """%(globals())
11
12 CGI_BASE = """#!/bin/sh
13 echo "Content-Type: text/plain"
14 echo
15 echo "%s"
16 """ % (MAGIC)
17
18 class Test (TestBase):
19 def __init__ (self):
20 TestBase.__init__ (self, __file__)
21 self.name = "CGI Wrong permissions"
22
23 self.request = "GET /%s/test HTTP/1.0\r\n" %(DIR)
24 self.conf = CONF
25 self.expected_error = 403
26
27 def Prepare (self, www):
28 d = self.Mkdir (www, DIR)
29 self.WriteFile (d, "test", 0400, CGI_BASE)
Something went wrong with that request. Please try again.