Skip to content

Commit 3977268

Browse files
committed
server, verdict: describe the session request and the firewall rules that block it
1 parent d471268 commit 3977268

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
A release is a tag in the repository, and the tag is the only place a version
44
number is written.
55

6+
## Unreleased
7+
8+
- The about page describes the session request, so firewall logs can be matched to it.
9+
- A blocked session request's summary says a firewall rule against upload-progress requests is a partial measure, not a fix.
10+
611
## v1.0.13 (2026-10-23)
712

813
A hardening release from a security audit of the public service. A hostile

‎engine/verdict/judge.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func silentNote(in Input) string {
203203
return " The session request returned PHP session warnings, but no answer could be classified: the response broke off, ended too close to the warnings, or was an error."
204204
}
205205
if in.SessionBlocked != "" {
206-
return " The session request was blocked (" + in.SessionBlocked + ")."
206+
return " The session request was blocked (" + in.SessionBlocked + "). A firewall rule against upload-progress requests also blocks it; such a rule is a partial measure, not a fix."
207207
}
208208
if reasons := hiding(in.PHPInfoSettings); len(reasons) > 0 {
209209
return " The session request showed nothing; the phpinfo() page shows " + strings.Join(reasons, " and ") + "."

‎server/public/about.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ <h2>What is recorded</h2>
2626
<h2>Recognising and allowing the check</h2>
2727
<p>Requests carry a <code>User-Agent</code> beginning with <code>php2shell-check</code> and a link to this page.
2828
{{- if .Sources}} They come from {{range $i, $a := .Sources}}{{if $i}} and {{end}}<code>{{$a}}</code>{{end}}.{{end}}</p>
29+
<p>When you confirm that you own the site, the check also sends a small multipart <code>POST</code> to a few paths, such as the start page and <code>/index.php</code>. It carries a form field <code>PHP_SESSION_UPLOAD_PROGRESS</code> with the value <code>probe</code>, a one-byte upload named <code>probe.txt</code>, and the cookie <code>PHPSESSID=_</code>. PHP rejects the invalid session id, so nothing is stored. A firewall rule against upload-progress requests stops this request too, and the result then says the session request was blocked.</p>
2930
<p>Some firewalls and hosts refuse the check, and the result then says it was blocked or got no answer. To let it through, allow {{if .Sources}}these addresses{{else}}this User-Agent{{end}} while you check, or check on the server with the commands every result lists.</p>
3031

3132
<h2>Source</h2>

0 commit comments

Comments
 (0)