Skip to content

Commit

Permalink
Backport: [#31036] Search is broken on Chrome #1312 Ref #3724
Browse files Browse the repository at this point in the history
  • Loading branch information
zero-24 committed Aug 31, 2014
1 parent e02ce00 commit a9956d4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions libraries/joomla/environment/uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,8 @@ public static function getInstance($uri = 'SERVER')
}
}

// Check for quotes in the URL to prevent injections through the Host header
if ($theURI !== str_replace(array("'", '"', '<', '>'), '', $theURI))
{
throw new InvalidArgumentException('Invalid URI detected.');
}
// Extra cleanup to remove invalid chars in the URL to prevent injections through the Host header
$theURI = str_replace(array("'", '"', '<', '>'), array("%27", "%22", "%3C", "%3E"), $theURI);
}
else
{
Expand Down

0 comments on commit a9956d4

Please sign in to comment.