From f486767b65eae588ee27f35dbdbd1225427f8e1e Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Fri, 8 Mar 2024 11:22:58 +0100 Subject: [PATCH] fix: messaging hostname --- .gitmodules | 2 +- app/console | 2 +- app/controllers/api/messaging.php | 10 ---------- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.gitmodules b/.gitmodules index e259782156..9806105261 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "app/console"] path = app/console url = https://github.com/appwrite/console - branch = 1.5.x + branch = 4.0.0 diff --git a/app/console b/app/console index 4769c50189..c1e6264eb2 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit 4769c5018979b3f00393ce3015ff8bf69d9c1657 +Subproject commit c1e6264eb2f99a7c2fb07d91cc95c14b83ad75d8 diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index 549bcc2e31..eba6dfe8c3 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -2935,13 +2935,8 @@ App::post('/v1/messaging/messages/push') } $host = App::getEnv('_APP_DOMAIN', 'localhost'); - $domain = new Domain(\parse_url($host, PHP_URL_HOST)); $protocol = App::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https'; - if (!$domain->isKnown()) { - throw new Exception(Exception::STORAGE_FILE_NOT_PUBLIC); - } - $scheduleTime = $currentScheduledAt ?? $scheduledAt; if (!\is_null($scheduleTime)) { $expiry = (new \DateTime($scheduleTime))->add(new \DateInterval('P15D'))->format('U'); @@ -3777,13 +3772,8 @@ App::patch('/v1/messaging/messages/push/:messageId') } $host = App::getEnv('_APP_DOMAIN', 'localhost'); - $domain = new Domain(\parse_url($host, PHP_URL_HOST)); $protocol = App::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https'; - if (!$domain->isKnown()) { - throw new Exception(Exception::STORAGE_FILE_NOT_PUBLIC); - } - $scheduleTime = $currentScheduledAt ?? $scheduledAt; if (!\is_null($scheduleTime)) { $expiry = (new \DateTime($scheduleTime))->add(new \DateInterval('P15D'))->format('U');