]> git.mxchange.org Git - friendica.git/commitdiff
Proxy: Avoid access for not logged in users
authorMichael <heluecht@pirati.ca>
Sun, 4 Jul 2021 10:55:32 +0000 (10:55 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 4 Jul 2021 10:55:32 +0000 (10:55 +0000)
src/Module/Proxy.php

index f929d4f736ccc7786dff2c2c0d6842705e549fdd..57ff59256460d4cf73cd73ee6ff73d018e582e7e 100644 (file)
@@ -45,8 +45,12 @@ class Proxy extends BaseModule
         * Sets application instance and checks if /proxy/ path is writable.
         *
         */
-       public static function init(array $parameters = [])
+       public static function rawContent(array $parameters = [])
        {
+               if (!local_user()) {
+                       throw new \Friendica\Network\HTTPException\ForbiddenException(DI::l10n()->t('Access denied.'));
+               }
+
                // Set application instance here
                $a = DI::app();