Fix error logic if no API key passed to provisioning/create API
This commit is contained in:
parent
bda6a4585c
commit
84c21de578
|
@ -23,9 +23,13 @@ class ProvisioningHelper
|
|||
* Zend app without the database unfortunately.)
|
||||
*/
|
||||
public function createAction()
|
||||
{
|
||||
$apikey = "";
|
||||
if (isset($_SERVER['PHP_AUTH_USER']))
|
||||
{
|
||||
$apikey = $_SERVER['PHP_AUTH_USER'];
|
||||
if (!isset($apikey) || $apikey != $this->apikey) {
|
||||
}
|
||||
if ($apikey != $this->apikey) {
|
||||
Logging::info("Invalid API Key: $apikey");
|
||||
http_response_code(403);
|
||||
echo "ERROR: Incorrect API key";
|
||||
|
|
Loading…
Reference in New Issue