Fixes for 389 Directory Server - addresses recursion issue #314. The primary issue was that 389DS doesnt render the subschemaSubentry attribute unless it is specifically requested.

This commit is contained in:
2025-04-27 14:03:21 +10:00
parent 53880121b6
commit a336e58b7a
4 changed files with 5 additions and 4 deletions

View File

@@ -311,7 +311,7 @@ class Attribute implements \Countable, \ArrayAccess
*/
public function render(bool $edit=FALSE,bool $old=FALSE,bool $new=FALSE): View
{
$view = match ($this->schema->syntax_oid) {
$view = match ($this->schema?->syntax_oid) {
self::SYNTAX_CERTIFICATE => view('components.syntax.certificate'),
self::SYNTAX_CERTIFICATE_LIST => view('components.syntax.certificatelist'),

View File

@@ -20,7 +20,7 @@ abstract class Base {
protected string $name = '';
// The OID of this schema item.
protected string $oid;
protected string $oid = '';
# The description of this schema item.
protected string $description = '';

View File

@@ -361,7 +361,8 @@ final class Server
// Try to get the schema DN from the specified entry.
$schema_dn = $this->schemaDN();
$schema = $this->fetch($schema_dn);
// @note: 389DS does not return subschemaSubentry unless it is requested
$schema = $this->fetch($schema_dn,['*','+','subschemaSubentry']);
// If our schema's null, we didnt find it.
if (! $schema)