Unverified Commit 97dd65be authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:sparkles: feat(setup) Sizelimit error instead of HTTP timeout for PHP<7.3

If we cannot paginate and there are too much entries, bail out.

issue #2895
Showing with 7 additions and 0 deletions
+7 -0
......@@ -1031,6 +1031,7 @@ class setupStepMigrate extends setupStep
}
} else {
/* fallback to search without pagination */
$ldap->set_size_limit(static::$objectNumberLimit);
$res = $ldap->search($filter, ['dn']);
if (!$res) {
throw new CheckFailedException(
......@@ -1038,6 +1039,12 @@ class setupStepMigrate extends setupStep
_('Possibly the "root object" is missing.')
);
}
if ($ldap->hitSizeLimit()) {
throw new CheckFailedException(
_('Sizelimit hit'),
sprintf(_('Sizelimit of %d hit. Please check this manually'), static::$objectNumberLimit)
);
}
}
while ($attrs = $ldap->fetch()) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment