removed some TODO tags

This commit is contained in:
Roman 2024-04-12 11:53:56 +02:00
parent b274cd4ad2
commit 12c6c665fc
5 changed files with 4 additions and 10 deletions

@ -180,8 +180,6 @@ namespace Documents\Install {
} }
} }
// TODO: check
$context = $this->getDocument()->getContext(); $context = $this->getDocument()->getContext();
$config = $context->getConfig(); $config = $context->getConfig();

@ -91,8 +91,6 @@ class Context {
} }
public function sendCookies(): void { public function sendCookies(): void {
// TODO: what will we do, when there is a domain mismatch? forbid access or just send cookies for the current domain? or should we send a redirect?
// $domain = $this->getSettings()->getDomain();
$domain = getCurrentHostName(); $domain = getCurrentHostName();
$this->language->sendCookie($domain); $this->language->sendCookie($domain);
$this->session?->sendCookie($domain); $this->session?->sendCookie($domain);

@ -41,10 +41,7 @@ class Router {
} }
public function run(string $url, array &$pathParams): ?Route { public function run(string $url, array &$pathParams): ?Route {
// TODO: do we want a global try cache and return status page 500 on any error?
$this->requestedUri = $url; $this->requestedUri = $url;
$url = strtok($url, "?"); $url = strtok($url, "?");
foreach ($this->routes as $route) { foreach ($this->routes as $route) {
$match = $route->match($url); $match = $route->match($url);

@ -75,12 +75,14 @@ if ($installation) {
if ($route === null) { if ($route === null) {
$response = $router->returnStatusCode(404); $response = $router->returnStatusCode(404);
} else if (!$settings->isTrustedDomain($currentHostName)) { } else if (!$settings->isTrustedDomain($currentHostName)) {
$error = "Untrusted Origin. Adjust the 'trusted_domains' setting " .
"to include the current host '$currentHostName' or contact the administrator to resolve this issue";
if ($route instanceof \Core\Objects\Router\ApiRoute) { if ($route instanceof \Core\Objects\Router\ApiRoute) {
header("Content-Type: application/json"); header("Content-Type: application/json");
http_response_code(403); http_response_code(403);
$response = json_encode(createError("Untrusted Origin")); $response = json_encode(createError($error));
} else { } else {
$response = $router->returnStatusCode(403, ["message" => "Untrusted Origin"]); $response = $router->returnStatusCode(403, ["message" => $error]);
} }
} else { } else {
$response = $route->call($router, $pathParams); $response = $route->call($router, $pathParams);

@ -356,7 +356,6 @@ export class ControlsColumn extends DataColumn {
key: "button-" + index, key: "button-" + index,
} }
// TODO: icon button!
if (button.hasOwnProperty("disabled")) { if (button.hasOwnProperty("disabled")) {
props.disabled = typeof button.disabled === 'function' props.disabled = typeof button.disabled === 'function'
? button.disabled(entry, index) ? button.disabled(entry, index)