Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

replace operation --> modification must be an Attribute #948

Closed
luisfran10 opened this issue Oct 28, 2023 · 1 comment
Closed

replace operation --> modification must be an Attribute #948

luisfran10 opened this issue Oct 28, 2023 · 1 comment

Comments

@luisfran10
Copy link

I'm trying to change a user password, but the changing object throw this message:

"Error: modification must be an Attribute"

//entry example #1
const entry = {
type: 'userPassword',
values: Buffer.from("${newPassword}", 'utf8'),};

//entry example #2
const entry = {
userPassword: Buffer.from("${newPassword}", 'utf16le')};

    const change = new Change({
      operation: 'replace',
      modification: entry,
    });

    client.modify(
      `${[this.seachAttribute]}=${user}`,
      change,
      (error: any) => {
        if (error) {
          Logger.log('modify error:', error.message);
          reject(error);
        }

        resolve(this);
      },
    );
@jsumners
Copy link
Member

Duplicate #859. Solution is noted in https://github.com/ldapjs/node-ldapjs/releases/tag/v3.0.0

@jsumners jsumners closed this as not planned Won't fix, can't repro, duplicate, stale Oct 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants