Skip to content

Internal error on failed IMAP authentication #270

Open
@cmoille

Description

@cmoille

Steps to reproduce

Having an IMAP authentication working
A user try to authenticate with a wrong login or a wrong password

Expected behaviour

get an error message on authentication page "Mauvais identifiant ou mot de passe."

Actual behaviour

Get an internal error page

Image

Affected Authentication backend

IMAP Authentication backend

Server configuration

User External App version: 3.0.4

Operating system: Linux 6.1.0-32-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.129-1 (2025-03-06) x86_64 GNU/Linux

Web server: apache 2.4.62-1~deb12u2

Database: mariadb 1:10.11.11-0+deb12u1

PHP version: 8.2.28

Nextcloud version: Nextcloud Hub 10 (31.0.2)

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

Where did you install Nextcloud from: nextcloud-latest.zip

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - activity: 4.0.0
  - app_api: 5.0.2
  - bruteforcesettings: 4.0.0
  - calendar: 5.2.1
  - circles: 31.0.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contacts: 7.0.4
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_antivirus: 6.0.0
  - files_downloadlimit: 4.0.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - firstrunwizard: 4.0.0
  - groupfolders: 19.0.4
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - mail: 4.3.6
  - nextcloud_announcements: 3.0.0
  - notes: 4.11.0
  - notifications: 4.0.0
  - oauth2: 1.19.1
  - password_policy: 3.0.0
  - photos: 4.0.0-dev.1
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - richdocuments: 8.6.4
  - richdocumentscode: 24.4.1302
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - spreed: 21.0.1
  - support: 3.0.0
  - survey_client: 3.0.0
  - systemtags: 1.21.1
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - updatenotification: 1.21.0
  - user_external: 3.4.0
  - user_status: 1.11.0
  - viewer: 4.0.0
  - weather_status: 1.11.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - admin_audit: 1.21.0
  - encryption: 2.19.0
  - files_external: 1.23.0
  - suspicious_login: 9.0.1
  - twofactor_nextcloud_notification: 5.0.0
  - twofactor_totp: 13.0.0-dev.0
  - user_ldap: 1.22.0

Nextcloud configuration:

Config report
{
    "system": {
        "loglevel": 0,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "31.0.2.1",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "sendmail",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "default_phone_region": "FR",
        "maintenance_window_start": 3,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "maintenance": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0
        },
        "user_backends": [
            {
                "class": "\\OCA\\UserExternal\\IMAP",
                "arguments": [
                    "***REMOVED SENSITIVE VALUE***",
                    993,
                    "ssl",
                    "***REMOVED SENSITIVE VALUE***",
                    true,
                    true
                ]
            }
        ]
    }
}

Logs

Nextcloud log (data/nextcloud.log)

Nextcloud log
{"reqId":"Z_Un1v7KLELkYjDdvsTPIAAAAAg","level":3,"time":"2025-04-08T13:42:48+00:00","remoteAddr":"***REMOVED SENSITIVE VALUE***","user":false,"app":"index","method":"POST","url":"/index.php/login","message":"Call to undefined method OC\\Server::getLogger() in file '/var/www/html/***REMOVED SENSITIVE VALUE***/apps/user_external/lib/IMAP.php' line 125","userAgent":"Mozilla/5.0 (Windows NT 10.0; rv:128.0) Gecko/20100101 Firefox/128.0","version":"31.0.2.1","exception":{"Exception":"Exception","Message":"Call to undefined method OC\\Server::getLogger() in file '/var/www/html/***REMOVED SENSITIVE VALUE***/apps/user_external/lib/IMAP.php' line 125","Code":0,"Trace":[{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/lib/private/Route/Router.php","line":307,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/lib/base.php","line":1025,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/***REMOVED SENSITIVE VALUE***/lib/private/AppFramework/Http/Dispatcher.php","Line":146,"Previous":{"Exception":"Error","Message":"Call to undefined method OC\\Server::getLogger()","Code":0,"Trace":[{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/lib/private/User/Manager.php","line":235,"function":"checkPassword","class":"OCA\\UserExternal\\IMAP","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/lib/private/Authentication/Login/UidLoginCommand.php","line":29,"function":"checkPasswordNoLogging","class":"OC\\User\\Manager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/lib/private/Authentication/Login/ALoginCommand.php","line":22,"function":"process","class":"OC\\Authentication\\Login\\UidLoginCommand","type":"->"},{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/lib/private/Authentication/Login/UserDisabledCheckCommand.php","line":39,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->"},{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/lib/private/Authentication/Login/ALoginCommand.php","line":22,"function":"process","class":"OC\\Authentication\\Login\\UserDisabledCheckCommand","type":"->"},{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/lib/private/Authentication/Login/PreLoginHookCommand.php","line":34,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->"},{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/lib/private/Authentication/Login/Chain.php","line":45,"function":"process","class":"OC\\Authentication\\Login\\PreLoginHookCommand","type":"->"},{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/core/Controller/LoginController.php","line":344,"function":"process","class":"OC\\Authentication\\Login\\Chain","type":"->"},{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"tryLogin","class":"OC\\Core\\Controller\\LoginController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/lib/private/Route/Router.php","line":307,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/lib/base.php","line":1025,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/***REMOVED SENSITIVE VALUE***/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/***REMOVED SENSITIVE VALUE***/apps/user_external/lib/IMAP.php","Line":125},"message":"Call to undefined method OC\\Server::getLogger() in file '/var/www/html/***REMOVED SENSITIVE VALUE***/apps/user_external/lib/IMAP.php' line 125","exception":{},"CustomMessage":"Call to undefined method OC\\Server::getLogger() in file '/var/www/html/***REMOVED SENSITIVE VALUE***/apps/user_external/lib/IMAP.php' line 125"}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions