RocketChat / RocketChat/Rocket.Chat

CAS user attribute resolve problem

Open
#6,259 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Rocket.Chat Version: 0.52.0
Running Instances: 1
DB Replicaset OpLog:Disabled
Node Version:v4.5.0

when use wordpress CAS plugin,CAS server response xml below if user not have fitstname and lastname:


<cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas">
  <cas:authenticationSuccess>
  <cas:user>aaaaaaaaaaa</cas:user>
  <cas:attributes>
    <cas:first_name/>
    <cas:last_name/>
    <cas:display_name>aaaaaaaaaaa</cas:display_name>
    <cas:user_email>535648741@qq.com</cas:user_email>
    <cas:user_url/>
  </cas:attributes>
  </cas:authenticationSuccess>
</cas:serviceResponse>  

Rocket chat will resolve attribute like:

debug Receveied response: { "username": "aaaaaaaaaaa", "attributes": { "first_name": [ "aaaaaaaaaaa535648741@qq.com" ] }, "PGTIOU": "", "ticket": "ST-YWFhYWFhYWFhYWF8aHR0cCUzQSUyRiUyRmNoYXQuaXY2LmNjJTJGX2NhcyUyRjVYdlBoUmR4b21aeVJDbml1fDE0ODg3NjUwOTkuNDA2Mnw0OWI0ZWI0MWFjZmQ3NDdhNmQyZmRjOTY2Y2IwNzk2OGQ4YzFiYTQ3", "proxies": [] }

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 by locating Rocket.Chat's CAS authentication and user-attribute parsing entry points, then reproduce the reported WordPress CAS response with empty first_name and last_name values. Compare the parsed attributes with the logged result and define completion as resolving the username, display name, and email without concatenating unrelated values.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.