summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2023-08-29 21:22:09 +0200
committerGitHub <noreply@github.com>2023-08-29 21:22:09 +0200
commitdaa2d69a1fcadbc4b6ef521c4073776889456060 (patch)
treef9b793a29292b5db9cb6140cb421f59930f5b02b
parent20969519f023bf320c1fe9fbda2d624b5e6b5c86 (diff)
parent1e6e722703911b71a11d1e4cfdbd7048b340b46d (diff)
downloadnextcloud-server-daa2d69a1fcadbc4b6ef521c4073776889456060.tar.gz
nextcloud-server-daa2d69a1fcadbc4b6ef521c4073776889456060.zip
Merge pull request #40032 from nextcloud/backport/40013/stable27
[stable27] Do not log passwords in debug mode
-rw-r--r--apps/user_ldap/lib/LDAP.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/LDAP.php b/apps/user_ldap/lib/LDAP.php
index 41a6f651f3b..454350ba095 100644
--- a/apps/user_ldap/lib/LDAP.php
+++ b/apps/user_ldap/lib/LDAP.php
@@ -33,6 +33,7 @@
*/
namespace OCA\User_LDAP;
+use OCP\IConfig;
use OCP\Profiler\IProfiler;
use OC\ServerNotAvailableException;
use OCA\User_LDAP\DataCollector\LdapDataCollector;
@@ -317,6 +318,14 @@ class LDAP implements ILDAPWrapper {
private function preFunctionCall(string $functionName, array $args): void {
$this->curArgs = $args;
+ if(strcasecmp($functionName, 'ldap_bind') === 0) {
+ // The arguments are not key value pairs
+ // \OCA\User_LDAP\LDAP::bind passes 3 arguments, the 3rd being the pw
+ // Remove it via direct array access for now, although a better solution could be found mebbe?
+ // @link https://github.com/nextcloud/server/issues/38461
+ $args[2] = IConfig::SENSITIVE_VALUE;
+ }
+
$this->logger->debug('Calling LDAP function {func} with parameters {args}', [
'app' => 'user_ldap',
'func' => $functionName,