Merge branch 'develop' into beta

fixes for api token check and empty page feature image
beta
Ro 4 years ago
commit 8355137952

@ -153,14 +153,22 @@ class APIControl
case "page":
$token = $request->getHeader("fipamo-access-token");
//Verify token for admin tasks
if (Session::verifyToken($token[0])) {
$result = PagesAPI::handlePageTask($request, $args);
if (isset($token[0])) {
if (Session::verifyToken($token[0])) {
$result = PagesAPI::handlePageTask($request, $args);
} else {
$result = [
"message" => "Invalid token, API access denied, homie",
"type" => "API_ERROR",
];
}
} else {
$result = [
"message" => "API access denied, homie",
"message" => "No token, API access denied, homie",
"type" => "API_ERROR",
];
}
break;
case "settings":
$token = $request->getHeader("fipamo-access-token");

@ -92,7 +92,7 @@ class Book
"/" .
$url[8];
} else {
$feature = $body["feature"];
$task == "create" ? ($feature = "") : ($feature = $body["feature"]);
}
}

File diff suppressed because one or more lines are too long

@ -313,6 +313,7 @@ class FipamoAdminAPI {
if (
eventType === TASK_SETTINGS_WRITE ||
eventType === TASK_PAGE_EDIT ||
eventType === TASK_PAGE_CREATE ||
eventType === TASK_PAGE_DELETE ||
eventType === TASK_PUBLISH_SITE ||
eventType === TASK_REINDEX_PAGE

Loading…
Cancel
Save