RocketChat / RocketChat/Rocket.Chat

User Data Field Map in SAML Settings Example template wrong

Open
#31,743 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/meteor/app/meteor-accounts-saml/server/lib/Utils.ts around line 124 and compare the SAML Settings Example template with commit fd3532d4f5cfc8d714d6b036c7ebd793b27e7dc2. Check whether other example placeholders were similarly changed. Done means the name template uses the expected double-underscore placeholders and no affected example retains the literal {{firstName}} form.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.