You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
root@yt:/var/www/phpldapadmin/lib# diff PageRender.php.orig PageRender.php
918,924c918,929
< protected function getAutoPostPasswordAttribute($attribute,$i) {
< # If the password is already encoded, then we'll return
< if (preg_match('/^\{.+\}.+/',$attribute->getValue($i)))
< return;
<
< $attribute->setPostValue(array('function'=>'PasswordEncrypt','args'=>sprintf('%%enc%%;%%%s%%',$attribute->getName())));
< $this->get('Post',$attribute,$i);
---
> protected function getAutoPostPasswordAttribute($attribute, $i) {
> // Extract the string data from the PasswordAttribute object
> $attributeString = $attribute->getValue(0); // Using index 0 as an example
>
> // If the attribute is null or already encoded, return early
> if ($attributeString === null || preg_match('/^\{.+\}.+/', $attributeString)) {
> return;
> }
>
> // Otherwise, proceed with password encryption and post
> $attribute->setPostValue(array('function'=>'PasswordEncrypt','args'=>sprintf('%%enc%%;%%%s%%', $attribute->getName())));
> $this->get('Post', $attribute, $i);
Describe the bug
When creating a new entry phpldapadmin shows an error.
Unrecognized error number: 8192: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
Might be associated to this issue: leenooks/phpLDAPadmin#237
Context
Steps to reproduce
objectClass: inetOrgPerson, mailAccount, userPermissionYnh
ou=alias
rdn=cn
Expected behavior
show the confirmation page after hitting the "create object" button
Logs
The text was updated successfully, but these errors were encountered: