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

LDAP search filter not sanitised in !verify command #51

Open
osslate opened this issue Jun 26, 2020 · 0 comments
Open

LDAP search filter not sanitised in !verify command #51

osslate opened this issue Jun 26, 2020 · 0 comments

Comments

@osslate
Copy link

osslate commented Jun 26, 2020

The !verify command accepts a username as the first parameter, which is used to lookup a user on an LDAP server. It's possible to do !verify * [email protected] (the username being a wildcard), and have brickbot cycle through every single user on the LDAP server to see if the email [email protected] matches their altmail. If it so happens that the email is associated with any username in the database, it'll grant you access to the Discord server. It may also be possible to craft other strings to send to the LDAP server, as presently, brickbot just injects user input into the search string.

I think the easiest way to fix this is to use an EqualityFilter as the filter key in https://github.com/redbrick/brickbot/blob/master/commands/verify.js#L19, but I don't have the time to test it.

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

No branches or pull requests

1 participant