Skip to main content

Detailed Authentication Errors

By default, PLANKA uses generic authentication error messages to avoid revealing sensitive information to potential attackers.

Enable Detailed Error Messages​

To aid in debugging or improve user experience, you can enable more specific error messages, such as:

  • "Invalid email or username"
  • "Invalid password"

Set the following environment variable in your .env file or Docker environment:

SHOW_DETAILED_AUTH_ERRORS=true

After setting this, restart the application for the change to take effect.

Security Warning​

danger

Do not enable detailed authentication errors in production without proper protections.

Detailed error messages can help attackers perform brute force or enumeration attacks.

You should:

  • Keep the built-in sign-in limits in place
  • Use Fail2Ban or a similar tool
  • Monitor logs for unusual login activity

Sign-in Limits​

Since version 2.3, PLANKA limits failed sign-ins on its own. Once a limit is reached, it answers with Rate limit exceeded (HTTP 409), even for the correct password, until the window has passed.

VariableDefaultDescription
AUTH_RATE_LIMIT_WINDOW60Length of the window in seconds.
AUTH_RATE_LIMIT_MAX_PER_IP30Attempts per client address.
AUTH_RATE_LIMIT_MAX_PER_IDENTIFIER10Attempts per email address or username.

Behind a reverse proxy, set TRUST_PROXY=true. Otherwise, all users count as one client address and share one limit.

The counters live in the PLANKA process. If you run several instances, each one counts on its own.

Further Reading​

For more insights on secure authentication practices, see: OWASP Authentication Cheat Sheet.