Skip to content

Protect shared accounts (murid, tamu, ...) and tell their users apart - #4

Merged
raf-li merged 3 commits into
mainfrom
fix/shared-accounts
Oct 4, 2026
Merged

raf-li merged 3 commits into
mainfrom
fix/shared-accounts

Conversation

@raf-li

@raf-li raf-li commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Why

On this server many people share one account: all students log in as murid, guests as tamu, invitees as hadirin, the student council as osis.

  1. Anyone on a shared account could delete it for everyone. A student logged in as murid sends /du murid, then y: the bot treats it as "deleting your own account", and no student can log in any more. Same for tamu, hadirin, osis.
  2. Join/login spam detection counted all of them as one person. It keys people by username + IP, so every student on murid behind the school network shared one counter again.

What

  • New setting SHARED_ACCOUNTS (default tamu, murid, hadirin, osis, pemateri, f.osis, guest; case-insensitive).
  • Shared accounts cannot be deleted via the bot: not by their users, not by admins, not with --force. Admins can still remove them in the TeamTalk client if they really mean to.
  • For shared accounts, join/login spam detection (and reconnect detection) uses username/nickname + IP, so Siti and Budi on murid are counted separately; someone hopping channels is still caught. Without a nickname it falls back to the username.
  • Channels: a channel created by murid belonged to every student on it, so any of them could delete it or give it away. Non-admin shared accounts can no longer /rc, /dc or /to via the bot. Admin accounts (pemateri, F.OSIS) keep their admin rights.
  • /help du, /help rc, README, docs and CHANGELOG updated.

pemateri and F.OSIS are shared admin accounts, so they are in the default list: they cannot be deleted via the bot and are told apart by nickname, but keep all admin rights.

Tested

With the real TeamTalk DLL: person keys for shared/personal accounts; 7 students on murid from one IP logging in and joining → no warnings; one student hopping → caught under murid/<nickname>; /du murid, /du murid --force, and admins deleting tamu/hadirin/osis/Murid refused; deleting your own personal account still asks for confirmation; students on murid cannot create, delete or transfer channels; admins on pemateri still can; personal accounts unchanged; pemateri/F.OSIS not deletable. All earlier suites pass.

Independent of #2/#3; this one is a security fix, so it is worth merging first.

🤖 Generated with Claude Code

raf-li and others added 3 commits October 5, 2026 01:21
The server's accounts are shared: all students log in as "murid", guests as
"tamu", invitees as "hadirin", the student council as "osis".

- /du: anyone on a shared account could delete it for everyone ("murid" +
  "/du murid" + "y" counted as deleting your own account). Accounts in the
  new SHARED_ACCOUNTS setting cannot be deleted via the bot, not even by
  admins or with --force; admins can still remove them in the TeamTalk client
- Join/login spam detection keyed people by username + IP, so every student
  on "murid" behind the school network counted as one person. For shared
  accounts the key is now username/nickname + IP

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…OSIS

- A channel created by "murid" belonged to every student on that account,
  so any of them could delete it or give it away. Non-admin shared accounts
  now cannot /rc, /dc or /to via the bot; admin accounts keep their rights
- pemateri and f.osis (shared admin accounts) join the default
  SHARED_ACCOUNTS, so they cannot be deleted via the bot and are told apart
  by nickname in spam detection

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@raf-li
raf-li merged commit ebab7f6 into main Oct 4, 2026
2 checks passed
@raf-li
raf-li deleted the fix/shared-accounts branch October 4, 2026 23:48
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