This commit is contained in:
Snafu 2021-05-29 02:07:15 +02:00 committed by GitHub
commit 0b7c10bf0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ class SMB extends Common implements INotifyStorage {
private function splitUser($user) {
if (strpos($user, '/')) {
return explode('/', $user, 2);
} elseif (strpos($user, '\\')) {
} elseif (strpos($user, '\\') !== false) {
return explode('\\', $user);
} else {
return [null, $user];
@ -219,7 +219,7 @@ class SMB extends Common implements INotifyStorage {
private function getACL(IFileInfo $file): ?ACL {
$acls = $file->getAcls();
foreach ($acls as $user => $acl) {
[, $user] = explode('\\', $user); // strip domain
[, $user] = $this->splitUser($user); // strip domain
if ($user === $this->server->getAuth()->getUsername()) {
return $acl;
}