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

How to make users register Jids in English only (Ejabberd 14.12) #388

Closed
leonardo-dev opened this issue Dec 24, 2014 · 4 comments
Closed

Comments

@leonardo-dev
Copy link

I'm trying to make user user only English to register on my server using ACL user_regexp: regexp as the following:

acl:
  regex:
    user_regexp: "^[s0-9a-za-z-_.]{3,25}$"

access:
  register: 
    all: deny
    regex: allow 

But it didn't work and the registration completely stop.

@beherit
Copy link

beherit commented Dec 24, 2014

Try something like this:

modules:
  mod_register:
    access: registration
access:
  registration:
    blocked_registration: deny
    allowed_registration: allow
acl:
  allowed_registration:
    user_regexp:
      - "^[a-z0-9_.-]*$"
  blocked_registration:
    user_glob:
      - "?"
      - "??"

@leonardo-dev
Copy link
Author

Thanks for your reply Beherit,
It works but in this way:

modules:
  mod_register:
    access: registration
access:
  registration:
    blocked_registration: deny
    allowed_registration: allow
acl:
  allowed_registration:
    user_regexp: "^[a-z0-9_.-]*$"
  blocked_registration:
    user_glob:
      - "?"
      - "??"

@weiss
Copy link
Member

weiss commented Dec 24, 2014

Just for the record:

access:
register:
all: deny
regex: allow

But it didn't work and the registration completely stop.

As the ACLs are checked sequentially and the first matching ACL wins, the
'regex' ACL was never used, here.

@lock
Copy link

lock bot commented Jun 12, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants