Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Username case #700

Open
clehner opened this issue Aug 6, 2022 · 3 comments
Open

Username case #700

clehner opened this issue Aug 6, 2022 · 3 comments
Labels
S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems.

Comments

@clehner
Copy link

clehner commented Aug 6, 2022

Re: https://matrix.to/#/!vCpZvJFNjuiBkDAvEs:cadair.com/$BBQ59q2vYuxYbJw794pbRnJRREfNmQEnuXQGKSzTBI0, https://matrix.to/#/!vCpZvJFNjuiBkDAvEs:cadair.com/$9tAWMGLZh_ooL1xdIE66B4ICey_T4BYa74MFG5XamzU

The bridge registers usernames containing uppercase characters.
I think this may have been causing a problem with Conduit (also reported here: https://gitlab.com/famedly/conduit/-/issues/295).

For now I made the following local change:

diff --git a/src/SlackGhostStore.ts b/src/SlackGhostStore.ts
index 91ed109..f5dd95f 100644
--- a/src/SlackGhostStore.ts
+++ b/src/SlackGhostStore.ts
@@ -55,7 +55,7 @@ export class SlackGhostStore {
     }

     public getUserId(id: string, teamDomain: string): string {
-        const localpart = `${this.config.username_prefix}${teamDomain.toLowerCase()}_${id.toUpperCase()}`;
+        const localpart = `${this.config.username_prefix}${teamDomain.toLowerCase()}_${id.toLowerCase()}`;
         return `@${localpart}:${this.config.homeserver.server_name}`;
     }
@jaller94
Copy link
Contributor

jaller94 commented Aug 8, 2022

User IDs are limited to a few specific characters. Upper case characters are not allowed.
https://spec.matrix.org/v1.3/appendices/#user-identifiers

@jaller94 jaller94 added the T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems. label Aug 8, 2022
@Half-Shot
Copy link
Contributor

I think the state of play here will be to create new users with lowercase IDs (and ensure the bridge is case insensitive). Existing Matrix ghost users will remain uppercase for now (which presumably won't be an issue, as they already exist).

@Half-Shot Half-Shot added S-Minor Impairs non-critical functionality or suitable workarounds exist S-Major Severely degrades major functionality or product features, with no satisfactory workaround and removed S-Minor Impairs non-critical functionality or suitable workarounds exist labels Aug 9, 2022
@clehner
Copy link
Author

clehner commented Aug 10, 2022

Related issue on mx-puppet-slack: https://gitlab.com/mx-puppet/slack/mx-puppet-slack/-/issues/108

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems.
Projects
None yet
Development

No branches or pull requests

3 participants