C9Glax / tranga

Docker-Container to monitor (Manga) Scanlation-Sites for download new chapters.
GNU General Public License v3.0
108 stars 10 forks source link

[It broke]: ntfy nofications use *** for authentication instead of the user input #171

Closed nickconway closed 2 months ago

nickconway commented 2 months ago

What is broken?

When an episode is downloaded and the API container tries to send a notification via ntfy that requires authentication, it uses '***' for the auth parameter instead of what the user inputs, resulting in a 500 error.

Log-output

[04/22/2024 18:29:16.207]          Ntfy | Sending notification: Chapter downloaded - Hunter X Hunter - 1
[04/22/2024 18:29:16.569]          Ntfy | InternalServerError: {"code":50001,"http":500,"error":"internal server error"}

Additional stuff

ntfy gives this error: 2024/04/22 14:29:16 INFO Connection closed with HTTP 500 (ntfy error 50001) (error=illegal base64 data at input byte 0, http_method=POST, http_path=/tranga?auth=***, tag=http, visitor_auth_limiter_limit=0.016666666666666666, visitor_auth_limiter_tokens=30, visitor_id=ip:172.18.0.1, visitor_ip=172.18.0.1, visitor_messages=0, visitor_messages_limit=17280, visitor_messages_remaining=17280, visitor_request_limiter_limit=0.2, visitor_request_limiter_tokens=60, visitor_seen=2024-04-22T14:29:16.567-04:00)

C9Glax commented 2 months ago

@db-2001 the *** sounds suspiciously much like the placeholder on the website...?

db-2001 commented 2 months ago

It does...but that should be a placeholder in the text box and not the value that we would use when configuring Ntfy. @nickconway have you tried to reconfigure Ntfy from the frontend?

nickconway commented 2 months ago

I noticed that as well. I was doing everything from the frontend, I think what's happening is hitting apply when the textbox is filled with sets the auth value to instead of using the previous value. I've got the notification working now after making sure not to apply anything twice.

C9Glax commented 2 months ago

I think I see the exact problem, instead of the placeholder tag, you set the value tag of textboxes, triggering an update. I'll just push a change in a sec.

C9Glax commented 2 months ago

Okay when it finishes building in a second, the cuttingedge branch should have the fix.

C9Glax commented 2 months ago

you might have to hard refresh (ctrl+f5) to clear the website cache, but its fixed for me :)

db-2001 commented 2 months ago

I think I see the exact problem, instead of the placeholder tag, you set the value tag of textboxes, triggering an update. I'll just push a change in a sec.

I'll take a look and fix this on the front end too, it thought I had checked to set the placeholder but ill check for the other connectors too

C9Glax commented 2 months ago

I fixed it on the frontend, since that it where the problem was. See here: https://github.com/C9Glax/tranga-website/commit/38572a3a46ce84b126b37c025f90fa0947be2545