mirror of https://gitlab.com/bashrc2/epicyon
Reject php requests
parent
4a50de31bf
commit
5c64462a5e
|
@ -269,6 +269,12 @@ def daemon_http_get(self) -> None:
|
|||
http_403(self)
|
||||
return
|
||||
|
||||
# php
|
||||
if 'index.php' in self.path:
|
||||
print('GET HTTP Attempt to access PHP file ' + self.path)
|
||||
http_404(self)
|
||||
return
|
||||
|
||||
if contains_invalid_chars(str(self.headers)):
|
||||
print('GET HTTP headers contain invalid characters ' +
|
||||
str(self.headers))
|
||||
|
|
|
@ -106,6 +106,12 @@ def daemon_http_post(self) -> None:
|
|||
http_403(self)
|
||||
return
|
||||
|
||||
# php
|
||||
if 'index.php' in self.path:
|
||||
print('POST HTTP Attempt to access PHP file ' + self.path)
|
||||
http_404(self)
|
||||
return
|
||||
|
||||
calling_domain = self.server.domain_full
|
||||
if self.headers.get('Host'):
|
||||
calling_domain = decoded_host(self.headers['Host'])
|
||||
|
|
Loading…
Reference in New Issue