Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[full-ci] [tests-only] Test expose group displayname #749

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

phil-davis
Copy link
Contributor

This is on top of PR #748 - I can run full-ci here, and work on fixing the tests. When it works, the needed changes can be distributed to the original PR, core etc - wherever they are needed.

@phil-davis phil-davis self-assigned this Jul 28, 2022
@phil-davis
Copy link
Contributor Author

https://drone.owncloud.com/owncloud/user_ldap/4065/71/19

runsh: Total unexpected failed scenarios throughout the test run:
apiCapabilities/capabilities.feature:821
apiCapabilities/capabilities.feature:850
apiCapabilities/capabilities.feature:882
apiCapabilities/capabilities.feature:914

Group with a # in the name fails.

https://drone.owncloud.com/owncloud/user_ldap/4065/76/19

runsh: Total unexpected failed scenarios throughout the test run:
apiShareManagementBasicToRoot/createShareToRootFolder.feature:387
apiShareManagementBasicToRoot/createShareToRootFolder.feature:388

Group names with emojis are not working.

https://drone.owncloud.com/owncloud/user_ldap/4065/77/19

runsh: Total unexpected failed scenarios throughout the test run:
apiShareManagementBasicToShares/createShareToSharesFolder.feature:427
apiShareManagementBasicToShares/createShareToSharesFolder.feature:428

Group names with emojis are not working.
https://drone.owncloud.com/owncloud/user_ldap/4065/87/19

runsh: Total unexpected failed scenarios throughout the test run:
apiTags/assignTags.feature:89

Group with a # in the name fails.

There is some problem with group names that have special characters. I guess that there is some escaping needed somewhere.

@jvillafanez maybe you can see straight away if there is a simple fix.

@jvillafanez
Copy link
Member

It follows the same sanitation rules as with the username (

user_ldap/lib/Access.php

Lines 587 to 593 in 8ba4029

if ($nameAttribute !== '') {
$name = $this->readAttribute($fdn, $nameAttribute);
$name = $name[0];
} else {
$name = $uuid;
}
$intName = $this->sanitizeUsername($name);
).

I've adjusted the code to sanitize only the username while leaving the groupname without changes. That should also help with the migration: current groups containing any of those chars should still be linked correctly after the migration.

@sonarcloud
Copy link

sonarcloud bot commented Aug 2, 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 2 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants