Skip to content

Commit bf217fe

Browse files
blizzzbackportbot[bot]
authored andcommitted
fix(Krb): switch away from deprecated and broken KerberosApacheAuth()
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
1 parent 20b4164 commit bf217fe

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • apps/files_external/lib/Lib/Backend

apps/files_external/lib/Lib/Backend/SMB.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
namespace OCA\Files_External\Lib\Backend;
99

1010
use Icewind\SMB\BasicAuth;
11-
use Icewind\SMB\KerberosApacheAuth;
1211
use Icewind\SMB\KerberosAuth;
12+
use Icewind\SMB\KerberosTicket;
1313
use Icewind\SMB\Native\NativeServer;
1414
use Icewind\SMB\Wrapped\Server;
1515
use OCA\Files_External\Lib\Auth\AuthMechanism;
@@ -84,9 +84,10 @@ public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user =
8484
throw new \InvalidArgumentException('invalid authentication backend');
8585
}
8686
$credentialsStore = $auth->getCredentialsStore();
87-
$kerbAuth = new KerberosApacheAuth();
87+
$kerbAuth = new KerberosAuth();
88+
$kerbAuth->setTicket(KerberosTicket::fromEnv());
8889
// check if a kerberos ticket is available, else fallback to session credentials
89-
if ($kerbAuth->checkTicket()) {
90+
if ($kerbAuth->getTicket()?->isValid()) {
9091
$smbAuth = $kerbAuth;
9192
} else {
9293
try {

0 commit comments

Comments
 (0)