Skip to content
Snippets Groups Projects
Commit 5dfd95f4 authored by Prasad's avatar Prasad
Browse files

Fixed preg_match return validation

parent 4f85fb3a
No related branches found
No related tags found
1 merge request!311Language italian translation
......@@ -34,7 +34,9 @@ class CustomerPortal_API_EntryPoint {
static function process(CustomerPortal_API_Request $request) {
$operation = $request->getOperation();
$response = false;
preg_match("/[0-9a-zA-z]*/", $operation, $match);
if (!preg_match("/[0-9a-zA-z]*/", $operation, $match)) {
throw new Exception("Invalid entry", 1412);
}
if ($operation == $match[0]) {
$operationFile = sprintf('/apis/%s.php', $operation);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment