Skip to content

Commit 530c849

Browse files
authored
Merge pull request #62841 from nextcloud/backport/62806/stable25
[stable25] fix: clear key password after loading key
2 parents f496caa + 66f83bd commit 530c849

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

‎apps/files_external/lib/Lib/Auth/PublicKey/RSA.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = n
6666
throw new \RuntimeException('unable to load private key');
6767
}
6868
}
69+
$auth->setPassword('');
6970
$storage->setBackendOption('public_key_auth', $auth);
7071
}
7172

‎apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = n
6464
throw new \RuntimeException('unable to load private key');
6565
}
6666
}
67+
68+
$auth->setPassword('');
6769
$storage->setBackendOption('public_key_auth', $auth);
6870
}
6971
}

0 commit comments

Comments
 (0)