pulsejet / nextcloud-oidc-login

Nextcloud login via a single OpenID Connect 1.0 provider
https://apps.nextcloud.com/apps/oidc_login
GNU Affero General Public License v3.0
219 stars 59 forks source link

Fix unallowed characters in username #259

Open azmeuk opened 8 months ago

azmeuk commented 8 months ago

Nextcloud does not allow accentuated or special character in the usernames: https://github.com/nextcloud/server/issues/21313

However sometimes nextcloud-oidc-login is plugged to a IDP where users already have accentuated characters.

I suggest that nextcloud-oidc-login automatically fixes unallowed characters in usernames: replacing accents with unaccented characters and removing other unallowed characters.

pulsejet commented 8 months ago

Sounds good. This needs to be configurable since it potentially opens up attack vectors. If the IdP has a user azmeuk, then I can create another user àzmeuk in the IdP and pretend to be azmeuk in Nextcloud.

A possible solution would be to suffix the username with some kind of hash of the original, whenever any transformation is done.