nextcloud / nextcloud/tasks

Sharing fails when autocompletion is disabled

Open
#1,341 18 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
706
Forks
117
Avg merge
8h 50m
Merged PRs (30d)
18

Description

Steps to reproduce
  1. Create new task
  2. Click on "shared button"
  3. Type user name
Expected behaviour

Show user with user name which I'm looking for.

Actual behaviour

No user shown.

Server configuration

Operating system: CentOS 7

Web server: Apache

Database: Mariadb

PHP version: 7.3.24

Nextcloud version: 20.0.1

Tasks version: 0.13.5

Updated from an older Nextcloud or fresh install: Updated from an older

Signing status:

No problem

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "20.0.1.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "mysql.utf8mb4": true,
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "default_language": "cs",
        "default_locale": "cs_CZ",
        "loglevel": 3,
        "ldapIgnoreNamingRules": false,
        "maintenance": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "theme": "",
        "trusted_domains": [
            "cloud."
        ],
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "sendmail",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "lost_password_link": "https:\/\/xxx\/",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trashbin_retention_obligation": "auto",
        "tempdirectory": "\/www\/tmp\/cloud\/",
        "ldapUserCleanupInterval": 3360,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "overwrite.cli.url": "https:\/\/cloud",
        "overwritehost": "cloud",
        "mail_smtpauthtype": "LOGIN",
        "simpleSignUpLink.shown": false,
        "app_install_overwrite": [
            "calendar",
            "contacts",
            "gallery",
            "spreed"
        ],
        "app.mail.accounts.default": {
            "email": "%EMAIL%",
            "imapHost": "imap",
            "imapPort": 993,
            "imapUser": "%USERID%",
            "imapSslMode": "ssl",
            "smtpHost": "smtp",
            "smtpPort": 587,
            "smtpUser": "%USERID%",
            "smtpSslMode": "STARTTLS"
        }
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: no

Are you using an external user-backend, if yes which one: LDAP

LDAP configuration (delete this part if not used)
+-------------------------------+--------------------------------------------+
| Configuration                 |                                            |
+-------------------------------+--------------------------------------------+
| hasMemberOfFilterSupport      |                                            |
| homeFolderNamingRule          |                                            |
| lastJpegPhotoLookup           | 0                                          |
| ldapAgentName                 |                                            |
| ldapAgentPassword             | ***                                        |
| ldapAttributesForGroupSearch  |                                            |
| ldapAttributesForUserSearch   |                                            |
| ldapBackupHost                |                                            |
| ldapBackupPort                | 389                                        |
| ldapBase                      | dc=cloud                               |
| ldapBaseGroups                | dc=cloud                               |
| ldapBaseUsers                 | dc=cloud                               |
| ldapCacheTTL                  | 600                                        |
| ldapConfigurationActive       | 1                                          |
| ldapDefaultPPolicyDN          |                                            |
| ldapDynamicGroupMemberURL     |                                            |
| ldapEmailAttribute            | mail                                       |
| ldapExperiencedAdmin          | 0                                          |
| ldapExpertUUIDGroupAttr       | cn                                         |
| ldapExpertUUIDUserAttr        | uid                                        |
| ldapExpertUsernameAttr        |                                            |
| ldapExtStorageHomeAttribute   |                                            |
| ldapGidNumber                 | gidNumber                                  |
| ldapGroupDisplayName          | cn                                         |
| ldapGroupFilter               | (&(objectclass=posixGroup)(cn=xxx))     |
| ldapGroupFilterGroups         | cloudusers                                   |
| ldapGroupFilterMode           | 1                                          |
| ldapGroupFilterObjectclass    | posixGroup                                 |
| ldapGroupMemberAssocAttr      | memberUid                                  |
| ldapHost                      | ldaps://xxxx                        |
| ldapIgnoreNamingRules         |                                            |
| ldapLoginFilter               | (&(|(objectclass=posixAccount))(uid=%uid)) |
| ldapLoginFilterAttributes     |                                            |
| ldapLoginFilterEmail          | 0                                          |
| ldapLoginFilterMode           | 1                                          |
| ldapLoginFilterUsername       | 1                                          |
| ldapMatchingRuleInChainState  | unknown                                    |
| ldapNestedGroups              | 0                                          |
| ldapOverrideMainServer        | 0                                          |
| ldapPagingSize                | 100                                        |
| ldapPort                      | 636                                        |
| ldapQuotaAttribute            | CloudQuota                              |
| ldapQuotaDefault              | 50 GB                                      |
| ldapTLS                       |                                            |
| ldapUserAvatarRule            | default                                    |
| ldapUserDisplayName           | gecos                                      |
| ldapUserDisplayName2          |                                            |
| ldapUserFilter                | (|(objectclass=inetOrgPerson))             |
| ldapUserFilterGroups          |                                            |
| ldapUserFilterMode            | 0                                          |
| ldapUserFilterObjectclass     | inetOrgPerson                              |
| ldapUuidGroupAttribute        | auto                                       |
| ldapUuidUserAttribute         | auto                                       |
| turnOffCertCheck              | 0                                          |
| turnOnPasswordChange          | 0                                          |
| useMemberOfToDetectMembership | 1                                          |
+-------------------------------+--------------------------------------------+


Client configuration

Browser: Vivaldi, Firefox, Chrome

Operating system: Linux

CalDAV-clients:

Logs
Web server error log
cloud. xxx - - [08/Nov/2020:12:46:57 +0100] "GET /ocs/v1.php/apps/files_sharing/api/v1/sharees?format=json&search=xxx&perPage=200&itemType=principals HTTP/2.0" 200 221 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.112 Safari/537.36"

Nextcloud log (data/nextcloud.log)
empty
Browser log
link address:
https://cloud./ocs/v1.php/apps/files_sharing/api/v1/sharees?format=json&search=xxx&perPage=200&itemType=principals

response:
{"ocs":{"meta":{"status":"ok","statuscode":100,"message":"OK","totalitems":"","itemsperpage":""},"data":{"exact":{"users":[{"label":"xxx","value":{"shareType":0,"shareWith":"xxx"},"status":[]}],"groups":[],"remotes":[],"remote_groups":[],"emails":[],"circles":[],"rooms":[],"lookup":[]},"users":[],"groups":[],"remotes":[],"remote_groups":[],"emails":[],"lookup":[],"circles":[],"rooms":[],"lookupEnabled":true}}}


Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the sharing flow from a new task with autocompletion disabled, then inspect the sharees endpoint shown in the report: /ocs/v1.php/apps/files_sharing/api/v1/sharees. Compare its response with the expected user lookup behavior and trace the frontend handling of the returned exact user. Done means typing a username displays the matching user for sharing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.