Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2628116
D25449.1732015669.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
635 B
Referenced Files
None
Subscribers
None
D25449.1732015669.diff
View Options
diff --git a/src/applications/auth/engine/PhabricatorAuthCSRFEngine.php b/src/applications/auth/engine/PhabricatorAuthCSRFEngine.php
--- a/src/applications/auth/engine/PhabricatorAuthCSRFEngine.php
+++ b/src/applications/auth/engine/PhabricatorAuthCSRFEngine.php
@@ -47,7 +47,10 @@
// We expect a BREACH-mitigating token. See T3684.
$breach_prefix = $this->getBREACHPrefix();
$breach_prelen = strlen($breach_prefix);
- if (strncmp($token, $breach_prefix, $breach_prelen) !== 0) {
+ if (
+ $token === null ||
+ strncmp($token, $breach_prefix, $breach_prelen) !== 0
+ ) {
return false;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 11:27 (21 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
977581
Default Alt Text
D25449.1732015669.diff (635 B)
Attached To
Mode
D25449: Fix PhabricatorAuthCSRFEngine.php strncmp(null) PHP 8.1 error
Attached
Detach File
Event Timeline
Log In to Comment