X Tutup
Skip to content

replace userid with username in login form#39870

Merged
phil-davis merged 4 commits intomasterfrom
replace-userid-with-username-in-login-form
Jul 7, 2022
Merged

replace userid with username in login form#39870
phil-davis merged 4 commits intomasterfrom
replace-userid-with-username-in-login-form

Conversation

@butonic
Copy link
Contributor

@butonic butonic commented Mar 11, 2022

While digging into owncloud/oauth2#326 @kulmann @TheOneRing and I pondered possible solutions to the original problem described in owncloud/oauth2#286

AFAIU the problem is that users may see the LDAP UUID of a user in the login form, which is very confusing. The solution in owncloud/oauth2#286 replaced the user id that clients picked up with the user name, but that parameter was originally only intended to be used for mounting windows network drives.

We tried various combinations of filling the user parameter un redirect and logout URLs produced by the oauth2 app and even found a bug where a redirect URL is not urlencoded. That will be followed up as a separate issue.

With this PR a user parameter will be replaced with the user name when a user with the given user id is found.

For users without a username this has no sideeffect, as the username falls back to the user id.

@update-docs
Copy link

update-docs bot commented Mar 11, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@butonic butonic self-assigned this Mar 11, 2022
@butonic
Copy link
Contributor Author

butonic commented Mar 11, 2022

maybe we should introduce a login_hint parameter?

@mmattel
Copy link
Contributor

mmattel commented Jun 17, 2022

@butonic we need a changelog and a rebase, then we also see if CI loves you more than before 😄

@butonic butonic force-pushed the replace-userid-with-username-in-login-form branch from dce224b to dea1717 Compare June 20, 2022 12:25
@mmattel mmattel force-pushed the replace-userid-with-username-in-login-form branch from dea1717 to bb4a08a Compare June 20, 2022 14:34
@mmattel
Copy link
Contributor

mmattel commented Jun 20, 2022

@phil-davis mind to help?
I have rebased the PR because CI killed itself post the former push of @butonic. Some but not all phpunit tests complain about: ...was not expected to be called more than once.

@phil-davis
Copy link
Contributor

Some but not all phpunit tests complain about

Fixed - the new code can end up calling userManager "get" twice in some cases.

@mmattel
Copy link
Contributor

mmattel commented Jun 21, 2022

@DeepDiver1975 mind to have a look on it? The change you requested has been implemented and CI is green now

@mmattel
Copy link
Contributor

mmattel commented Jun 30, 2022

@DeepDiver1975 sorry for pinging again, but could be a quick win as all is green.

@phil-davis phil-davis force-pushed the replace-userid-with-username-in-login-form branch from 93d5a0a to d0992be Compare July 7, 2022 10:14
@phil-davis phil-davis requested a review from jvillafanez July 7, 2022 10:16
@phil-davis
Copy link
Contributor

@jvillafanez I fixed my mistake, and rebased. CI is running. Please review and take over any needed code changes.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@phil-davis phil-davis dismissed DeepDiver1975’s stale review July 7, 2022 11:05

The review item has been marked as resolved, and no response to pings above.

@phil-davis phil-davis merged commit 568b87f into master Jul 7, 2022
@delete-merged-branch delete-merged-branch bot deleted the replace-userid-with-username-in-login-form branch July 7, 2022 11:06
@jnweiger
Copy link
Contributor

jnweiger commented Sep 9, 2022

Confirmed fixed in oc 10.11.0-rc.1 using user_ldap 0.16.0 and oauth2-0.5.3

No uuid identifier seen anywhere! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

X Tutup