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

[IMAP] long login delay on large mailboxes #145

Closed gagarinlg closed 4 years ago

gagarinlg commented 4 years ago

Steps to reproduce

  1. enable he plugin
  2. configure imap usage
  3. log in with imap user with lots of directories

Expected behaviour

login should be fast regardless of the number of directories Fix: add curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'CAPABILITY'); in imap.php line 44 so only capabilities will be fetched anmd not all directories

Actual behaviour

20s login delay

Affected Authentication backend

IMAP

Server configuration

User External App version: (see Nextcloud apps page) 0.9.1

Operating system: Ubuntu Linux 20.04

Web server: Apache

Database: MariaDB

PHP version: 7.4

Nextcloud version: (see Nextcloud admin page) 18.0.3

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

Where did you install Nextcloud from: manual install

Signing status:

Signing status ``` Login as admin user into your Nextcloud and access http://example.com/index.php/settings/integrity/failed paste the results here. ``` No errors have been found.

List of activated apps:

App list ``` 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:

Config report ``` If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder or Insert your config.php content here. Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …) ```

Logs

Web server error log

Web server error log ``` Insert your webserver log here ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` Insert your Nextcloud log here ```

Browser log

Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
violoncelloCH commented 4 years ago

@rollbrettler can you verify this? would you mind opening a pullrequest for this @gagaringlg ? :)

rollbrettler commented 4 years ago

Sounds good, was not aware of that.

gagarinlg commented 4 years ago

I still think this is a bug and not just an enhancement. In our uinstalation this lead, for some people, to login times of 20 to 30 seconds, which is just unusable. I created a pull request to fix this. For some reasone I wrote a wrong line number in the descripition, sorry for that.

violoncelloCH commented 4 years ago

well it's somewhere in between... but anyway, that's just a label here...

gagarinlg commented 4 years ago

do I have to do something else to get the fix merged?

violoncelloCH commented 4 years ago

sorry for the delay... I'll take a look asap

gagarinlg commented 4 years ago

No problem, I just wasn't sure if I forgot something.