Notifiarr / notifiarr

Client for Notifiarr.com
https://notifiarr.com
MIT License
494 stars 28 forks source link

Notifiarr won't start if Deluge has empty password #742

Closed ocervell closed 2 months ago

ocervell commented 3 months ago

My Deluge is only exposed locally and has no password set.

In my configuration I have:

[[deluge]]
name     = "deluge"  # Set a name to enable checks of your service.
url      = "http://192.168.1.18:8112"
password = ""

Notifiarr fails to start with:

[ERROR] 2024/05/28 10:15:55 Using Config File: /config/notifiarr.conf: getting config: setting up app: invalid application configuration provided: missing url or password: Deluge config 1
--

This used to work fine but now it fails.

davidnewhall commented 3 months ago

Setting a Deluge password will get you fixed right up.

ocervell commented 3 months ago

Yes, but I don't want a Deluge password =D My set up is local so it's overkill for me. Is there a way we can accept an empty password ?

davidnewhall commented 3 months ago

The Deluge author did not write it so it would work without a password. You're using a modified version. Unfortunately Notifiarr will only work with a password and there's no plans to change that.

ocervell commented 3 months ago

Sorry but you are wrong. I'm using the latest official Docker Deluge container and it's definitely possible to set an empty password. Test it out yourself https://hub.docker.com/r/linuxserver/deluge if you don't take my word for it.

On top of that, it used to work with notifiarr so it's most likely a recent code change (started after my latest upgrade, probably the first since ~5months) that disabled the possibility (probably something like an if check with the empty string being an empty value)...

bakerboy448 commented 3 months ago

The Deluge author did not write it so it would work without a password. You're using a modified version. Unfortunately Notifiarr will only work with a password and there's no plans to change that.

Got confirmation from the deluge team it is possible to set to empty password.

Which is not no password

you CAN set an empty password, but given the fact that we still require you to hit ENTER on a password field i think it demonstrates that it SHOULDNT be set to empty

ocervell commented 3 months ago

Right ... So can we allow an empty password by modifying the line here ?

davidnewhall commented 3 months ago

How do I give my Deluge no password?

Okay, I set no password and it still asked for one. I feel like it used to set the password to deluge when left blank. Now it's just weird. I'll consider removing the restriction that has been in place since Deluge support was added to Notifiarr years ago.

ocervell commented 3 months ago

There is a slight difference between no password and an empty ("") password, we should allow the latest but not the former imo.

davidnewhall commented 3 months ago

What's the difference and how would you detect it?

bakerboy448 commented 3 months ago

None vs. empty string? Is that feasible

ocervell commented 2 months ago

Yes. Make it a pointer the &password. If it's nil output an error, otherwise let it go through even if it's "". I've already pointed in the code where the code change needs to be made.

davidnewhall commented 2 months ago

Screenshot 2024-06-13 at 8 44 55 PM hmmm