nextcloud / user_external

👥 External user authentication methods like IMAP, SMB and FTP
https://apps.nextcloud.com/apps/user_external
108 stars 64 forks source link

External Users not found while sharing until username (E-Mail Address) complete #73

Closed lephisto closed 5 years ago

lephisto commented 5 years ago

Steps to reproduce

  1. Install NC 15.07 + users_external
  2. Configure IMAP Server
  3. Login once with an Imap user, so a record gets inserted to *users_external
  4. Try to share a Directory ort File and search for the uid (aka. E-Mail Address)

Expected behaviour

The IMAP User Record should appear after starting to type the E-Mail Address

Actual behaviour

The IMAP User only get's displayed after entering the complete E-Mail Address

Affected Authentication backend

IMAP

Server configuration

User External App version: (see Nextcloud apps page)

0.6.1

Operating system:

Ubuntu 18.04

Web server:

Apache

Database:

MariaDB 10.1

PHP version:

7.1-7.3

Nextcloud version: (see Nextcloud admin page)

15.0.7

Updated from an older Nextcloud/ownCloud or fresh install:

Updated, but probably happens on fresh install as well.

Where did you install Nextcloud from:

update Channel

Signing status:

Signing status ``` No errors have been found. ```

List of activated apps:

App list ``` Enabled: - accessibility: 1.1.0 - activity: 2.8.2 - admin_audit: 1.5.0 - bruteforcesettings: 1.3.0 - calendar: 1.6.5 - cloud_federation_api: 0.1.0 - comments: 1.5.0 - contacts: 3.1.1 - dav: 1.8.1 - federatedfilesharing: 1.5.0 - federation: 1.5.0 - files: 1.10.0 - files_pdfviewer: 1.4.0 - files_sharing: 1.7.0 - files_texteditor: 2.7.0 - files_trashbin: 1.5.0 - files_versions: 1.8.0 - files_videoplayer: 1.4.0 - gallery: 18.2.0 - logreader: 2.0.0 - lookup_server_connector: 1.3.0 - nextcloud_announcements: 1.4.0 - notifications: 2.3.0 - oauth2: 1.3.0 - password_policy: 1.5.0 - provisioning_api: 1.5.0 - richdocuments: 3.2.4 - serverinfo: 1.5.0 - support: 1.0.0 - survey_client: 1.3.0 - systemtags: 1.5.0 - tasks: 0.9.8 - theming: 1.6.0 - twofactor_backupcodes: 1.4.1 - twofactor_u2f: 2.1.3 - updatenotification: 1.5.0 - user_external: 0.6.1 - workflowengine: 1.5.0 Disabled: - bookmarks - encryption - files_accesscontrol - files_automatedtagging - files_external - files_retention - firstrunwizard - sharebymail - twofactor_totp - user_ldap ```

Nextcloud configuration:

Config report ``` { "system": { "debug": true, "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "X", "Y", "Z" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "15.0.7.0", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "defaultapp": "activity", "theme": "", "activity_expire_days": 90, "maintenance": false, "forcessl": true, "secret": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_smtpmode": "smtp", "mail_domain": "***REMOVED SENSITIVE VALUE***", "filelocking.enabled": "true", "memcache.local": "\\OC\\Memcache\\Redis", "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "auth.bruteforce.protection.enabled": false, "redis": { "host": "***REMOVED SENSITIVE VALUE***", "0": "\/tmp\/redis.sock", "port": 6379, "timeout": 0, "dbindex": 0 }, "user_backends": [ { "class": "OC_User_IMAP", "arguments": [ "mail.niedermayr.net", 993, "ssl", "" ] } ], "loglevel": 2, "trashbin_retention_obligation": 30, "updater.release.channel": "production", "singleuser": false, "overwrite.cli.url": "https:\/\/nc.niedermayr.net", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_sendmailmode": "smtp", "mail_smtpport": "587", "mail_smtpsecure": "tls" } } ```

Logs

Web server error log

Web server error log ``` IP - - [30/Apr/2019:02:51:09 +0200] "GET /ocs/v1.php/apps/files_sharing/api/v1/sharees?format=json&search=bma&perPage=200&itemType=file HTTP/1.1" 200 1444 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/73.0.3683.86 Chrome/73.0.3683.86 Safari/537.36 ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` Nextcloud Log stays silend ```
lephisto commented 5 years ago

I fixed that one in #74 pls review!

adminhh commented 5 years ago

I can confirm this bug since NC 15.07 with our NC installation at school. Our NC installation won't be usable without user-external functioning in a proper way. So let me know if we can support your project in any way

violoncelloCH commented 5 years ago

@adminhh the best support would probably be in manpower (as I, as a busy student in the middle of some final exams, currently don't have enough time to work on this) also take a look at #77 (because this one is most probably related or has the same cause) if you thought about support in the form of money, the best way would probably be to post a bounty (on bountysource on this (or the other) issue (not sure though if this is possible already for this repo or if @jospoortvliet could enable it?)... posting a bounty would raise the motivation for any volunteer to work on the issue :) or if you're school has a support contract with Nextcloud GmbH, you could probably get one of the professional Nextcloud engineers working on this through the contract (cc @nickvergessen, also because this is highly relative to #77)

violoncelloCH commented 5 years ago

so I had the time to test this and can now say, that this (as well as #77) is coming from the changes done in #30, most likely the changed database queries... I just checked out one commit before the merge commit of #30 and there it's working even with the latest master of server

violoncelloCH commented 5 years ago

okay I've been wrong with my test of @lephisto 's PR #74 which already fixes this; see https://github.com/nextcloud/user_external/pull/74#pullrequestreview-244603435

adminhh commented 5 years ago

Just downloaded the latest zip file and autocompletion is working again (NC 16.01). One question though: how can I contribute to the project in general? Found 26 entries on bountysource... To whom shall I donate and who will be respponsible for the QA in the future? Thanks anyway

violoncelloCH commented 5 years ago

cool, thanks for confirming @adminhh