fix security issue and filter on active users

This commit is contained in:
2018-03-15 15:41:08 +01:00
parent b131e6b09e
commit d58eeafdb5
2 changed files with 9 additions and 8 deletions

View File

@@ -6,6 +6,10 @@ $response = [
try {
$inputJSON = file_get_contents('php://input');
$input = json_decode($inputJSON, TRUE);
if (!isset($input)) {
throw new Exception('request body is no valid json');
}
if (!isset($input["lookup"])) {
throw new Exception('"lookup" is not defined');
}
@@ -36,7 +40,6 @@ try {
}
break;
case "msisdn":
error_log("sb requested a bulk lookup for msisdn");
break;
default:
throw new Exception("unknown type for \"by\" param");