Skip to content

Commit

Permalink
Encode the value of Mibew root according to RFC 3986
Browse files Browse the repository at this point in the history
  • Loading branch information
faf committed Mar 23, 2014
1 parent bf254a2 commit d819e20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mibew/libs/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}

// Sanitize path to application and remove extra slashes
$mibewroot = join("/", array_map("urlencode", preg_split('/\//', preg_replace('/\/+$/', '', preg_replace('/\/{2,}/', '/', '/' . $mibewroot)))));
$mibewroot = join("/", array_map("rawurlencode", preg_split('/\//', preg_replace('/\/+$/', '', preg_replace('/\/{2,}/', '/', '/' . $mibewroot)))));

// Sanitize database tables prefix
$mysqlprefix = preg_replace('/[^A-Za-z0-9_$]/', '', $mysqlprefix);
Expand Down

0 comments on commit d819e20

Please sign in to comment.