flipboxfactory / saml-sp

SAML Service Provider (SP) Plugin for Craft CMS
https://saml-sp.flipboxfactory.com/
Other
19 stars 5 forks source link

Non ASCII characters in user group names #65

Closed lars-at-nxc closed 4 years ago

lars-at-nxc commented 4 years ago

Hi!

I have a issue with non ASCII characters (e.g. æ,ø,å) in the user group names. Craft will not allow these in the user group handle. Is it possible to translit UTF-8 to ASCII here?

Perhaps it can be a setting to specify character mappings to be perform.

Best regards Lars

dsmrt commented 4 years ago

We are looking at a fix for this. We might be able to get the character mapping in too. Looking to get something out for the fix by the end of this week.

dsmrt commented 4 years ago

I think we are going to run the handle through this: \Craft\StringHelper::toAscii. That uses a character map and I think that should suffice.

dsmrt commented 4 years ago

Alright, that did seem to fix the issue. I added some error logging there too just incase there are any issues with conflicts with existing groups. (I was seeing this while testing.)

Tagged in https://github.com/flipboxfactory/saml-sp/releases/tag/2.1.10

fugelset commented 4 years ago

Thanks a lot! It works like a charm :-)