#5738·panel

Automated script testing pterodactyl login fails with 500 instead of expected 400

Author: dark2phoenixCreated Sep 28, 2026Updated Sep 28, 2026

Current Behavior

This appears to be directly related to Authentication throwing a 500 error with reCAPTCHA #4714 but it was closed a long time ago.

Using a script to determine if logins are working after a programmatic deploy/configure.

Server returns a "500 Server Error"

Expected Behavior

Should return a 400 error because the script can't deal with the Captcha.

Steps to Reproduce

Post to /auth/login withoutt the ReCaptcha token. Run this against any panel with reCAPTCHA enabled (the default). It only needs curl:

bash
PANEL=https://panel.example.com
JAR=$(mktemp)
curl -s -c "$JAR" -o /dev/null "$PANEL/auth/login"
XSRF=$(awk '$6=="XSRF-TOKEN"{print $7}' "$JAR" | sed 's/%3D/=/g')
curl -s -b "$JAR" -o /dev/null -w '%{http_code}\n' \
  -H 'Content-Type: application/json' -H 'Accept: application/json' \
  -H "X-XSRF-TOKEN: $XSRF" \
  -d '{"user":"[email protected]","password":"x"}' \
  "$PANEL/auth/login"

Panel Version

1.15.1

Wings Version

N/A

Games and/or Eggs Affected

N/A

Docker Image

ghcr.io/pterodactyl/panel:latest # resolved to v1.15.1

Error Logs

bash
[2026-09-28 12:19:02] production.ERROR: Pterodactyl\Events\Auth\FailedCaptcha::__construct(): Argument #2 ($domain) must be of type string, null given, called in /app/app/Http/Middleware/VerifyReCaptcha.php on line 50 {"exception":"[object] (TypeError(code: 0): ...
[stacktrace]
#0 /app/app/Http/Middleware/VerifyReCaptcha.php(50): Pterodactyl\\Events\\Auth\\FailedCaptcha->__construct('[IP]', NULL)
#1 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Pterodactyl\\Http\\Middleware\\VerifyReCaptcha->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#2 /app/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(166): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))

Is there an existing issue for this?

  • I have searched the existing issues before opening this issue. I understand that maintainers may close this issue without communication if I have not provided sufficient information.