Rocket.Chat
Rocket.Chat copied to clipboard
User Data Field Map in SAML Settings Example template wrong
Description:
User Data Field Map in SAML Settings Example template wrong
Steps to reproduce:
Using the Template results in Full Name being "{{firstName}} {{lastName}}" the literal string via SAML login.
I got digging in the code and found that it should be "__firstName__ __lastName__"
https://github.com/RocketChat/Rocket.Chat/blob/cb9c6ba1cbd39c44a70d0e59d93bc14b3a672ccf/apps/meteor/app/meteor-accounts-saml/server/lib/Utils.ts#L124
The change was introduced in commit. fd3532d4f5cfc8d714d6b036c7ebd793b27e7dc2
This is what effected me, but I assume there are more of this, where __ accidentally were replaced with {{ or }}
It is incredibly confusing and frustrating when an example is not working and you have to dig into the code base.
Expected behavior:
{"email": "mail","username": {"fieldName": "mail","regex": "(.*)@.+$","template": "user-regex"}, "name": { "fieldNames": ["firstName", "lastName"], "template": "__firstName__ __lastName__"}, "{{identifier}}": "uid"}
Actual behavior:
{"email": "mail","username": {"fieldName": "mail","regex": "(.*)@.+$","template": "user-regex"}, "name": { "fieldNames": ["firstName", "lastName"], "template": "{{firstName}} {{lastName}}"}, "{{identifier}}": "uid"}
I Highlighted the wrong section.