UP-NextPush / server-app

UnifiedPush provider for Nextcloud - server application - Moved to https://codeberg.org/NextPush/uppush
GNU Affero General Public License v3.0
67 stars 8 forks source link

Empty redis password causes crash #2

Closed karmanyaahm closed 2 years ago

karmanyaahm commented 2 years ago

I'm using the standard Nextcloud docker setup and I get

[index] Error: RedisException: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct? at <<closure>>

0. /var/www/html/custom_apps/uppush/lib/Controller/UnifiedPushProviderController.php line 46
   Redis->auth("")
1. /var/www/html/custom_apps/uppush/lib/Controller/UnifiedPushProviderController.php line 149
   OCA\UnifiedPushProvider\Controller\UnifiedPushProviderController->redis_connect()
2. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 218
   OCA\UnifiedPushProvider\Controller\UnifiedPushProviderController->syncDevice("***-8d9a-4b88-b650-***")
3. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 127
   OC\AppFramework\Http\Dispatcher->executeController(OCA\UnifiedPushP ... {}, "syncDevice")
4. /var/www/html/lib/private/AppFramework/App.php line 157
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\UnifiedPushP ... {}, "syncDevice")
5. /var/www/html/lib/private/Route/Router.php line 302
   OC\AppFramework\App::main("OCA\\UnifiedPus ... r", "syncDevice", OC\AppFramework\ ... {}, {deviceId: "597a ... "})
6. /var/www/html/lib/base.php line 993
   OC\Route\Router->match("/apps/uppush/de ... 4")
7. /var/www/html/index.php line 37
   OC::handleRequest()

GET /index.php/apps/uppush/device/***-8d9a-4b88-b650-***
from 172.18.0.1 at 2021-12-11T04:26:06+00:00

Commenting out this line is a workaround https://github.com/UP-NextPush/server-app/blob/d04e8d0683c2413ed6324bdfd97788b98f04e0fd/lib/Controller/UnifiedPushProviderController.php#L46

I'm not using a redis password because it's only exposed on the internal docker network. Checking if password != "" in the if statement on line 46, would probably fix this.

p1gp1g commented 2 years ago

Does the branch empty-redis-pass fix the problem ?

karmanyaahm commented 2 years ago

It works, thanks.