nextcloud / nextcloud/server

SMB external storage ignores Kerberos authentication and attempts BasicAuth

Open
#58,027 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 32-feedback bug feature: external storage
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

Using external storage over SMB produce BasicAuth errors even when kerberos-ticket (apache-mode) authentification is selected.

Steps to reproduce
  1. Install nextcloud with apache and kerberos authentification
  2. configure LDAP
  3. try to add external storage over SMB with kerberos ticket in apache-mode
Expected behavior

All users with rights can use external storage

Nextcloud Server version

32

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info
 Exception Icewind\SMB\BasicAuth::__construct(): Argument #3 ($password) must be of type string, null given, called in /var/www/html/nextcloud/apps/files_external/lib/Lib/Backend/SMB.php on line 106 in file '/var/www/html/nextcloud/3rdparty/icewind/smb/src/BasicAuth.php' line 17

    /var/www/html/nextcloud/lib/private/AppFramework/App.phpZeile 153

    OC\AppFramework\Http\Dispatcher->dispatch()

    /var/www/html/nextcloud/lib/private/Route/Router.phpZeile 321

    OC\AppFramework\App::main()

    /var/www/html/nextcloud/lib/base.phpZeile 1061

    OC\Route\Router->match()

    /var/www/html/nextcloud/index.phpZeile 25

    OC::handleRequest()

Verursacht von TypeError Icewind\SMB\BasicAuth::__construct(): Argument #3 ($password) must be of type string, null given, called in /var/www/html/nextcloud/apps/files_external/lib/Lib/Backend/SMB.php on line 106

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

Start in apps/files_external/lib/Lib/Backend/SMB.php around line 106 and inspect how the Kerberos ticket/apache-mode selection reaches Icewind\SMB\BasicAuth in 3rdparty/icewind/smb/src/BasicAuth.php. Reproduce the SMB external-storage setup with Apache Kerberos authentication and verify that Kerberos mode no longer attempts BasicAuth with a null password.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.