Skip to content

Commit 74fcbfa

Browse files
minor symfony#58725 [HttpFoundation] Remove invalid HTTP method from exception message (nicolas-grekas)
This PR was merged into the 5.4 branch. Discussion ---------- [HttpFoundation] Remove invalid HTTP method from exception message | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT This info is not needed so better remove it as its garbage user input anyway. Commits ------- 596f8bb [HttpFoundation] Remove invalid HTTP method from exception message
2 parents 684f704 + 596f8bb commit 74fcbfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,7 @@ public function getMethod()
12941294
}
12951295

12961296
if (!preg_match('/^[A-Z]++$/D', $method)) {
1297-
throw new SuspiciousOperationException(sprintf('Invalid method override "%s".', $method));
1297+
throw new SuspiciousOperationException('Invalid HTTP method override.');
12981298
}
12991299

13001300
return $this->method = $method;

0 commit comments

Comments
 (0)