Skip to content

Wider log filter for password commands, F3 + D reminder after resetpassword - #53

Open
touchfalls wants to merge 1 commit into
mainfrom
security/log-filter-and-reset-warning
Open

touchfalls wants to merge 1 commit into
mainfrom
security/log-filter-and-reset-warning

Conversation

@touchfalls

Copy link
Copy Markdown
Owner
  • Paper log filter: besides Paper's own issued server command line, any console line with a password command (/login, /l, /register, /cp, namespaced forms) followed by an argument is dropped, so command-spy and chat-logging plugins cannot leak passwords. The slash must start a word (line start, whitespace or a quote/bracket), so paths like /home/l x and URLs are kept. Trade-off: a chat line such as "type /login to continue" is dropped too, because it cannot be told apart from /login <password>.
  • F3 + D reminder: after /authadmin resetpassword a player who ran it (not the console) is told the temporary password stays in the chat history. Paper and Fabric, all five languages.
  • Fabric has no log filter: the vanilla server does not log player commands.

Taken from the unmerged local branch fix/paper-layer-1.2.2 (deleted); the rest of that branch was already in main or conflicts with Folia support.

Tests: PaperSensitiveCommandLogFilterTest; ./gradlew test passes locally.

The Paper log filter dropped only Paper's own 'issued server command' line, so
plugins that log commands in their own format (command spies, chat loggers)
could still write passwords to the console. Any line with a password command
and an argument at the start of a word is now dropped.

After /authadmin resetpassword, a player who ran it is told to clear the chat
with F3 + D, since the temporary password stays in the chat history.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant