Non-ascii handling in register module
Concerned version
Version: %2.0.4
Platform: (Nginx/Apache/Node.js)
Summary
- Try to register a user called "Étienne Pérez"
- computed username will be épérez
- The confirmation email is badly encoded
- We probably don't want accents in username anyways
Furthermore, the "login computation" rule (flastname) is duplicated between Demo.pm and LDAP.pm. We might want to be able to configure it globally someday
Backends used
with Register::LDAP
Possible fixes
I am proposing the following fixes:
-
Strip accented characters from firstname and lastname entirely before concatenating them. Despite some effort, I wasn't able to only remove the accents. Étienne Pérez becommes ''tprez'', but that's better than a non-working login.
-
Create a new base class for Register modules (Register::Base.pm) to mutualize this work between Demo.pm, LDAP.pm and future register modules