Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix profiler trying to serialize invalid utf8
The cookie value contains invalid utf8 characters most of the time so
let's just ignore it as it is also not that interesting to analyse.

Signed-off-by: Carl Schwan <[email protected]>
  • Loading branch information
CarlSchwan authored and backportbot-nextcloud[bot] committed Jun 20, 2022
commit 6beddbc163d92dbe3106808d9e70005c9b598bad
10 changes: 9 additions & 1 deletion apps/user_ldap/lib/LDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,15 @@ private function preFunctionCall(string $functionName, array $args): void {
$this->curArgs = $args;

if ($this->dataCollector !== null) {
$args = array_map(fn ($item) => (!$this->isResource($item) ? $item : '(resource)'), $this->curArgs);
$args = array_map(function ($item) {
if ($this->isResource($item)) {
return '(resource)';
}
if (isset($item[0]['value']['cookie']) && $item[0]['value']['cookie'] !== "") {
$item[0]['value']['cookie'] = "*opaque cookie*";
}
return $item;
}, $this->curArgs);

$this->dataCollector->startLdapRequest($this->curFunc, $args);
}
Expand Down