Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Discourse does not allow group starting or ending by dot [.] #9

Open
warlof opened this issue Sep 23, 2018 · 3 comments
Open

Discourse does not allow group starting or ending by dot [.] #9

warlof opened this issue Sep 23, 2018 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@warlof
Copy link
Contributor

warlof commented Sep 23, 2018

It appears that the login flow is currently sanitize the role name but keeping leading and ending dot [.] character.

As a result, the user will get all group except those containing a dot at the beginning or ending position.

Not working case :
..TICKER
TICKER.

Working case :
TI.CKER

@herpaderpaldent
Copy link
Owner

Could you give me a little more information on this issue? I would need to know what is been created on Discourse and what is synced.

SeAt Discourse Working?
..Ticker ? No
Ticker. ? No
TI.CKER TI.CKER YES

All i do is using the studly_case() Method and i am surprised that the dot [.] sanitized.
https://github.com/herpaderpaldent/seat-discourse/blob/master/src/Action/Discourse/Groups/Attach.php#L33

If the error lies here, the dot is missing in the groups name in Discourse.

However it might be an error in the SSO-Provider:
https://github.com/herpaderpaldent/seat-discourse/blob/master/src/Action/Discourse/Groups/Attach.php#L33

@herpaderpaldent herpaderpaldent self-assigned this Sep 24, 2018
@herpaderpaldent herpaderpaldent added the bug Something isn't working label Sep 24, 2018
@warlof
Copy link
Contributor Author

warlof commented Sep 24, 2018

Let's take a character with the following roles :

  • TICKER.
  • ..TICKER
  • TICKER.LEADERSHIP

When this user will auth to Discourse, he will get TICKER.LEADERSHIP only
Update .TICKER to TICKER, and on next sign in, he will get TICKER.LEADERSHIP and TICKER - but still not ..TICKER

@herpaderpaldent
Copy link
Owner

from the code pov i don't really see why this is happening.

Though ppl using dots as Rolenames is a special use case but ofc i should account for this. I'll look into it thank you :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants