Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

two IMAP servers

未关闭
#278 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
php

调研方向

Start in apps/user_external/lib/IMAP.php at line 74, then trace the checkPassword path shown in the log for the second IMAP configuration. Confirm the fix by checking that users from both configured servers can authenticate without the internal server error.

由索引模型根据 Issue 内容生成。

描述

How do I connect a second IMAP server for authentication?
Nextcloud Hub 25 Autumn (32.0.2)
Here's the config:

 'user_backends' =>
  array (
    0 =>
    array (
     'class' => '\\OCA\\UserExternal\\IMAP',
     'arguments' =>
      array (
        0 => 'mail.domain1.com',
        1 => 993,
        2 => 'ssl',
        3 => 'domain1.com',
        4 => false,
        5 => false,
        ),.
    ),
    1 =>
    array (
     'class' => '\\OCA\\UserExternal\\IMAP',
     'arguments' =>
     array (
       0 => 'mail.domain2.com',
       1 => 993,
       2 => 'ssl',
       3 => 'domain2.com',
       4 => false,
       5 => false,
       ),
     ),
   ),

User [email protected] logs in normally.
User [email protected] have error Internal Server Error
in nextcloud.log:
{"reqId":"16288Eia1QgwTtaMlrY0","level":3,"time":"2025-12-01T11:13:54+00:00","remoteAddr":"195.96.64.194","user":"--","app":"index","method":"POST","url":"/login","message":"Call to undefined method OC\\Server::getLogger() in file '/var/www/nextcloud/apps/user_external/lib/IMAP.php' line 74","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36","version":"32.0.2.2","exception":{"Exception":"Exception","Message":"Call to undefined method OC\\Server::getLogger() in file '/var/www/nextcloud/apps/user_external/lib/IMAP.php' line 74","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":153,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":321,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1061,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":25,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":150,"Previous":{"Exception":"Error","Message":"Call to undefined method OC\\Server::getLogger()","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/User/Manager.php","line":230,"function":"checkPassword","class":"OCA\\UserExternal\\IMAP","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/UidLoginCommand.php","line":29,"function":"checkPasswordNoLogging","class":"OC\\User\\Manager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":22,"function":"process","class":"OC\\Authentication\\Login\\UidLoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/UserDisabledCheckCommand.php","line":39,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":22,"function":"process","class":"OC\\Authentication\\Login\\UserDisabledCheckCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/PreLoginHookCommand.php","line":34,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/Chain.php","line":43,"function":"process","class":"OC\\Authentication\\Login\\PreLoginHookCommand","type":"->"},{"file":"/var/www/nextcloud/core/Controller/LoginController.php","line":353,"function":"process","class":"OC\\Authentication\\Login\\Chain","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":204,"function":"tryLogin","class":"OC\\Core\\Controller\\LoginController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":118,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":153,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":321,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1061,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":25,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/user_external/lib/IMAP.php","Line":74},"message":"Call to undefined method OC\\Server::getLogger() in file '/var/www/nextcloud/apps/user_external/lib/IMAP.php' line 74","exception":{},"CustomMessage":"Call to undefined method OC\\Server::getLogger() in file '/var/www/nextcloud/apps/user_external/lib/IMAP.php' line 74"}}

主要语言
JavaScript
星标
121
派生
73
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nextcloud/user_external 的其他 Issue

查看 nextcloud/user_external 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。