LogicTrail
  • Trails
  • Check my app
  • Pricing
  • Sign in
  1. Trails
  2. /
  3. Keeping it running
  4. · 4 minutes · Pro

The password in the logs

To debug a sign-in bug, your AI added a log line. Weeks later you open your hosting logs and see customers' passwords in plain text.

This answers: Is it dangerous to console.log request bodies? No coding needed. 3 quick decisions.

  • Keeping data safe
  • Keys and secrets
  • Keeping it running

Checking your access…

Is it dangerous to console.log request bodies?

Yes. Logging a whole request body copies everything the user sent, including passwords and tokens, into your hosting logs, where teammates, log services and anyone with a stolen login can read it. Log what happened, such as a user id and outcome, never request bodies. If secrets reached the logs, delete them and protect affected users.

Trail of the bug
  1. Browser
  2. Your server
  3. Logs

Breaks at Logs: Request body, password included, logged

Why AI tools write this bug

When debugging, AI tools add console.log of the full request to see what arrived, and the line stays in after the bug is fixed.

How to fix it

  1. Remove logs that print bodies, headers, tokens or passwords.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock

Common questions

Doesn't my auth provider hash passwords anyway?
It does in its database. A log line copies the plain password before it is hashed, into a place with different access.

Related scenarios

  • The agent that reset productionFree · 5 min
  • The key in the bundleFree · 4 min
  • Approve this command?Free · 4 min

More on this trail

Keeping it running: Silent errors, empty AI credits, expired domains, leaky logs, risky updates and retired models.

Want someone to look?

We check AI-built apps for this and three other common leaks, in plain English.

Check my app
Sign in

Sign in to walk this one

3 decisions, about 4 minutes, and a prompt to check your own app for the same problem.

Sign in No password. We email you a link.

How to fix it

  1. Remove logs that print bodies, headers, tokens or passwords.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock