aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2021-12-16 17:04:10 +0100
committerCarl Schwan <carl@carlschwan.eu>2021-12-20 15:36:52 +0100
commit52760a95d9d21c1e95968ff38a719f31f128ba5a (patch)
tree565e2c829703941240d69186834bed3d16becb4d /apps/user_ldap
parent0fc8b55bf1861336e263252e50b8b0c82e4dccbd (diff)
downloadnextcloud-server-52760a95d9d21c1e95968ff38a719f31f128ba5a.tar.gz
nextcloud-server-52760a95d9d21c1e95968ff38a719f31f128ba5a.zip
Check if directoy is writable instead of possibly missing file
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/LDAP.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/LDAP.php b/apps/user_ldap/lib/LDAP.php
index 900f5a7030f..8f1d63f95eb 100644
--- a/apps/user_ldap/lib/LDAP.php
+++ b/apps/user_ldap/lib/LDAP.php
@@ -352,7 +352,7 @@ class LDAP implements ILDAPWrapper {
$this->curFunc = $functionName;
$this->curArgs = $args;
- if ($this->logFile !== '' && is_writable($this->logFile)) {
+ if ($this->logFile !== '' && is_writable(dirname($this->logFile)) && (!file_exists($this->logFile) || is_writable($this->logFile))) {
$args = array_reduce($this->curArgs, static function (array $carry, $item): array {
$carry[] = !is_resource($item) ? $item : '(resource)';
return $carry;