Skip to content

SOAP: log username instead of password on failed login - #491

Open
i-am-fyre wants to merge 1 commit into
mangoszero:masterfrom
i-am-fyre:fix-soap-log
Open

i-am-fyre wants to merge 1 commit into
mangoszero:masterfrom
i-am-fyre:fix-soap-log

Conversation

@i-am-fyre

@i-am-fyre i-am-fyre commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

When a SOAP login fails because of a wrong password, SoapThread.cpp passes soap->passwd to a message that says it is printing the account name:

sLog.outString("SoapThread: Client sent an invalid password for account %s", soap->passwd);

As a result, the server log records the plaintext password that was tried. That is often a real password: one with a typo, or one sent to the wrong account.

This PR passes soap->userid instead, so the log shows the account name as the message intends.

Changes

  • src/mangosd/SOAP/SoapThread.cpp: log soap->userid instead of soap->passwd in the invalid-password message.

Note for server operators

On servers with SOAP enabled, existing logs may already contain passwords from failed SOAP logins. Operators may want to delete those log lines and change the affected passwords.

How to test

  1. Enable SOAP in mangosd.conf (SOAP.Enabled = 1).
  2. Send a SOAP request using an existing account name and a wrong password.
  3. Check the server log. The failed-login line should show the account name, not the password.

🤖 Generated with Claude Code


This change is Reviewable

When a SOAP client sent a valid account name with a wrong password,
SoapThread logged soap->passwd in the "invalid password for account"
message. This wrote the attempted plaintext password to the server log.

Log soap->userid instead, which is what the message meant to print.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@AppVeyorBot

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants