public static function sanitizeBatchArray(array $batches) { foreach ($batches as $bI => $batch) { if (!isset($batch['values'])) { continue; } foreach ($batch['values'] as $vI => $value) { if (is_string($value) && self::isBinary($value)) { $batches[$bI]['values'][$vI] = LdapUtilities::MASK_BINARY; } } if (isset($batch['attrib']) && in_array(strtolower($batch['attrib']), self::MASK_ATTRIBUTES)) { $batches[$bI]['values'] = [self::MASK_PASSWORD]; } } return $batches; }
/** * {@inheritdoc} */ public function getLogArray() { return $this->mergeLogDefaults(['DN' => $this->properties['dn'], 'Batch' => print_r(LdapUtilities::sanitizeBatchArray($this->getBatchArray()), true)]); }