Skip to content

Fix case sensitivity for app passwords/tokens - #40280

Closed
pako81 wants to merge 2 commits into
owncloud:masterfrom
pako81:fix-app-passwords-case-sensitive
Closed

Fix case sensitivity for app passwords/tokens#40280
pako81 wants to merge 2 commits into
owncloud:masterfrom
pako81:fix-app-passwords-case-sensitive

Conversation

@pako81

@pako81 pako81 commented Aug 10, 2022

Copy link
Copy Markdown

Description

Fix case sensitivity for app passwords/tokens

Related Issue

Motivation and Context

Currently, app passwords/tokens are case sensitive. That is, login will be prevented if the entered username has different case as the app password/token's username (which comes from the user's session).

How Has This Been Tested?

  1. Login as user User1 and create an app password/token --> username will be automatically set to User1 and saved as the login_name in the oc_authtoken table.
  2. Try to authenticate by using i.e. the ownCloud desktop client with the newly generated app password/token by using user1 as username (note the different casing):

Before this fix --> login failed with exception https://github.com/owncloud/core/blob/master/lib/private/User/Session.php#L927

After this fix --> login is correctly allowed, which is consistent with the "normal" login via username/password where usernames are case-insensitive.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised
@pako81 pako81 added this to the development milestone Aug 10, 2022
@pako81 pako81 self-assigned this Aug 10, 2022
@update-docs

update-docs Bot commented Aug 10, 2022

Copy link
Copy Markdown

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.

@sonarqubecloud

Copy link
Copy Markdown
Comment thread CHANGELOG.md
Summary
-------

* Bugfix - Fix case sensitivity for app passwords/tokens - [#40280](https://github.com/owncloud/core/pull/40280)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't directly edit this file. See PR #40281 for a suggested changelog entry. I also made a test scenario there.

@pako81

pako81 commented Aug 10, 2022

Copy link
Copy Markdown
Author

Closing this in favour of #40281

@pako81 pako81 closed this Aug 10, 2022
@pako81
pako81 deleted the fix-app-passwords-case-sensitive branch August 10, 2022 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants