diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-06-17 10:23:03 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-06-20 11:11:12 +0200 |
commit | 35d8bdc840aa90e0788144214b475e607d81e9e0 (patch) | |
tree | e0cbe81461bf62741f6683a66f482f876440c611 /apps/user_ldap | |
parent | 596ead787ba7f7148fceb04de9d7c08cece936bc (diff) | |
download | nextcloud-server-35d8bdc840aa90e0788144214b475e607d81e9e0.tar.gz nextcloud-server-35d8bdc840aa90e0788144214b475e607d81e9e0.zip |
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 <carl@carlschwan.eu>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/lib/LDAP.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/LDAP.php b/apps/user_ldap/lib/LDAP.php index 3c579596941..545a09ca464 100644 --- a/apps/user_ldap/lib/LDAP.php +++ b/apps/user_ldap/lib/LDAP.php @@ -320,7 +320,15 @@ class LDAP implements ILDAPWrapper { $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); } |