Skip to content
This repository
Browse code

Fixing issue in #562 where URLs with colons in paths would prevent pa…

…rsing.
  • Loading branch information...
commit cff3a20f3ae40c6237fb5ed8817b921618efaa88 1 parent 5e48385
Nate Abele nateabele authored

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 action/Request.php
6 action/Request.php
@@ -586,9 +586,9 @@ protected function _url() {
586 586 return rtrim($_GET['url'], '/');
587 587 }
588 588 if ($uri = $this->env('REQUEST_URI')) {
589   - return trim(preg_replace(
590   - '/^' . preg_quote($this->env('base'), '/') . '/', '', parse_url($uri, PHP_URL_PATH)
591   - ), '/') ?: '/';
  589 + list($uri) = explode('?', $uri, 2);
  590 + $base = '/^' . preg_quote($this->env('base'), '/') . '/';
  591 + return trim(preg_replace($base, '', $uri), '/') ?: '/';
592 592 }
593 593 return '/';
594 594 }

0 comments on commit cff3a20

Please sign in to comment.
Something went wrong with that request. Please try again.