Skip to content

Commit

Permalink
RequestFactory: invalid byte sequences in path are not silently disca…
Browse files Browse the repository at this point in the history
…rded
  • Loading branch information
JanTvrdik committed Dec 16, 2014
1 parent 88784b1 commit 563c85a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Http/RequestFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ public function createHttpRequest()

// normalized url
$url->canonicalize();
$url->setPath(Strings::fixEncoding($url->getPath()));

if (preg_match(self::NONCHARS, $url->getPath()) || preg_last_error()) {
throw new InvalidRequestException(); // TODO!
}

// detect script path
if (isset($_SERVER['SCRIPT_NAME'])) {
Expand Down

0 comments on commit 563c85a

Please sign in to comment.