mirror of
https://github.com/nextcloud/server.git
synced 2026-07-16 05:13:10 -04:00
fix(Krb): switch away from deprecated and broken KerberosApacheAuth()
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
c0b31d1e2d
commit
fd799afc17
2 changed files with 4 additions and 8 deletions
|
|
@ -9,8 +9,8 @@
|
|||
namespace OCA\Files_External\Lib\Backend;
|
||||
|
||||
use Icewind\SMB\BasicAuth;
|
||||
use Icewind\SMB\KerberosApacheAuth;
|
||||
use Icewind\SMB\KerberosAuth;
|
||||
use Icewind\SMB\KerberosTicket;
|
||||
use Icewind\SMB\Native\NativeServer;
|
||||
use Icewind\SMB\Wrapped\Server;
|
||||
use OCA\Files_External\Lib\Auth\AuthMechanism;
|
||||
|
|
@ -85,9 +85,10 @@ class SMB extends Backend {
|
|||
throw new \InvalidArgumentException('invalid authentication backend');
|
||||
}
|
||||
$credentialsStore = $auth->getCredentialsStore();
|
||||
$kerbAuth = new KerberosApacheAuth();
|
||||
$kerbAuth = new KerberosAuth();
|
||||
$kerbAuth->setTicket(KerberosTicket::fromEnv());
|
||||
// check if a kerberos ticket is available, else fallback to session credentials
|
||||
if ($kerbAuth->checkTicket()) {
|
||||
if ($kerbAuth->getTicket()?->isValid()) {
|
||||
$smbAuth = $kerbAuth;
|
||||
} else {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -1462,11 +1462,6 @@
|
|||
<code><![CDATA[class-string<IStorage>]]></code>
|
||||
</MoreSpecificReturnType>
|
||||
</file>
|
||||
<file src="apps/files_external/lib/Lib/Backend/SMB.php">
|
||||
<DeprecatedClass>
|
||||
<code><![CDATA[new KerberosApacheAuth()]]></code>
|
||||
</DeprecatedClass>
|
||||
</file>
|
||||
<file src="apps/files_external/lib/Lib/Storage/SFTP.php">
|
||||
<InternalMethod>
|
||||
<code><![CDATA[put]]></code>
|
||||
|
|
|
|||
Loading…
Reference in a new issue