Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Prevent null-byte injection in preg_replace()

  • Loading branch information...
commit ffa720d90a79c1f33cf4c5a33403d09a67b42a66 1 parent dedd542
@lem9 lem9 authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  libraries/Tracker.class.php
View
3  libraries/Tracker.class.php
@@ -877,6 +877,9 @@ static public function handleQuery($query)
if (empty($dbname)) {
return;
}
+ // Remove null bytes (preg_replace() is vulnerable in some
+ // PHP versions)
+ $dbname = str_replace("\0", "", $dbname);
// If we found a valid statement
if (isset($result['identifier'])) {
Please sign in to comment.
Something went wrong with that request. Please try again.