Skip to content

Commit ece8e7b

Browse files
committed
add POST check for debugging console from laravel, symfony, and rails
1 parent c788e62 commit ece8e7b

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

TESTS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,14 @@ about possibly installed software on a developer machine or file names. Impact i
418418
usually low, but it is very common.
419419

420420

421+
postdebug
422+
---------
423+
424+
Some web frameworks show a debugging console when they receive an unexpected HTTP
425+
method. This can often be triggered by sending a POST request to the main page. This
426+
test looks for such debugging consoles from Laravel, Symfony, and Rails.
427+
428+
421429
axfr
422430
----
423431

snallygaster

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,24 @@ def test_desktopini(url):
785785
pout("desktopini", url + "/Desktop.ini")
786786

787787

788+
@DEFAULT
789+
def test_postdebug(url):
790+
try:
791+
r = pool.request("POST", url, retries=False, redirect=False)
792+
data = r.data.decode("ascii", errors="ignore")
793+
if (
794+
"The POST method is not supported for" in data
795+
and "Symfony\\Component\\HttpKernel\\Exception" in data
796+
):
797+
pout("postdebug_laravel", url + " POST")
798+
elif "Symfony Exception" in data and '<div class="exception-' in data:
799+
pout("postdebug_symfony", url + " POST")
800+
elif "<title>Action Controller: Exception caught" in data:
801+
pout("postdebug_rails", url + " POST")
802+
except (urllib3.exceptions.HTTPError, UnicodeError, ConnectionRefusedError):
803+
pass
804+
805+
788806
@DEFAULT
789807
@HOSTNAME
790808
def test_axfr(qhost):

0 commit comments

Comments
 (0)