Skip to content

Commit

Permalink
added $ to regex (openemr#2969)
Browse files Browse the repository at this point in the history
  • Loading branch information
shachar058 committed Feb 24, 2020
1 parent 1ccaa14 commit f4cffc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Common/Http/HttpRestRouteHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static function dispatch(&$routes, $route, $request_method, $return_metho
$routePieces = explode(" ", $routePath);
$method = $routePieces[0];
$path = $routePieces[1];
$pattern = "@^" . preg_replace('/\\\:[a-zA-Z0-9\_\-]+/', '([a-zA-Z0-9\-\_]+)', preg_quote($path)) . "$@D";
$pattern = "@^" . preg_replace('/\\\:[a-zA-Z0-9\_\-]+/', '([a-zA-Z0-9\-\_\$]+)', preg_quote($path)) . "$@D";
$matches = array();
if ($method == $request_method && preg_match($pattern, $route, $matches)) {
array_shift($matches);
Expand Down

0 comments on commit f4cffc7

Please sign in to comment.