hrfee / jfa-go

a bit-of-everything user managament app for Jellyfin

Home Page:https://jfa-go.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CAPTCHA does not work with subfolder reverse proxy

tenninjas opened this issue · comments

Read the FAQ first!

Describe the bug

Captcha does not work when using subfolder reverse proxy.

To Reproduce

Setup reverse proxy using subfolder as per wiki; enable Captcha on invites; captcha will fail to load. Debug shows 404 error.

Logs

[GIN/DEBUG] 10:47:35: GET(/accounts/captcha/gen/x8stUK3TAGfC54RY9XLuPW) => 404 in 206.524µs;

Configuration

[ui]

url_base         = /accounts

Platform/Version

Linux / version: 0.4.0 (c6fc576)

If I comment out subsequent url_base values in config.ini; the captcha begins loading correctly.

Although the captcha now loads correctly it cannot be used. Entering the first character of the captcha results in the tab completely hanging in both Chrome and Firefox. Debug log shows:

[GIN/DEBUG] 11:17:40: GET(/accounts/captcha/img/iHLp9UbwyFryQmVAjsp7WG/SJ-DV-XX) => 200 in 2.88377ms;
[GIN/DEBUG] 11:17:48: POST(/accounts/captcha/verify/iHLp9UbwyFryQmVAjsp7WG/SJ-DV-XX/8) => 400 in 30.417µs;

...

[GIN/DEBUG] 11:21:46: GET(/accounts/captcha/img/iHLp9UbwyFryQmVAjsp7WG/I6-06-CD) => 200 in 3.167859ms;
[GIN/DEBUG] 11:21:50: POST(/accounts/captcha/verify/iHLp9UbwyFryQmVAjsp7WG/I6-06-CD/N) => 400 in 29.214µs;

Can confirm, looking at those debug logs, it seems like it immediately tries to validate the captcha and fails with a http 400. Aka a bad request. For the time being I recomend turning it off

I'm having the same issue, that the tab is starting to crash. These are my logs:

[GIN/DEBUG] 15:01:34: GET(/captcha/gen/e9asfJxGbBuiqMMTJ2xDdk) => 200 in 2.393572ms; 
[GIN/DEBUG] 15:01:35: GET(/captcha/img/e9asfJxGbBuiqMMTJ2xDdk/CJ-0J-SK) => 200 in 3.885331ms; 
[GIN/DEBUG] 15:01:37: POST(/captcha/verify/e9asfJxGbBuiqMMTJ2xDdk/CJ-0J-SK/T) => 400 in 44.382µs; 
[DEBUG] 15:01:51 auth.go:54: Auth denied: signature is invalid
[GIN/DEBUG] 15:01:51: GET(/invites) => 401 in 87.23µs; 
[DEBUG] 15:01:51 auth.go:54: Auth denied: signature is invalid
[DEBUG] 15:01:51 auth.go:54: Auth denied: signature is invalid