X Tutup
Skip to content

Fix case sensitivity for app passwords/tokens#40280

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

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

Conversation

@pako81
Copy link

@pako81 pako81 commented Aug 10, 2022

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
Copy link

update-docs bot commented Aug 10, 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.

@sonarqubecloud
Copy link

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

Summary
-------

* Bugfix - Fix case sensitivity for app passwords/tokens - [#40280](https://github.com/owncloud/core/pull/40280)
Copy link
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
Copy link
Author

pako81 commented Aug 10, 2022

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup