Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLIDE doesn't properly handle updateConnectionPassword with no password #2698

Open
Yury-Fridlyand opened this issue Nov 16, 2024 · 0 comments
Labels
1_2_candidate bug Something isn't working

Comments

@Yury-Fridlyand
Copy link
Collaborator

See the test below. It reaches log points # 1, 2 and 3 and getting error before 4. This behavior happens on cluster and standalone clients both.
If I use client.updateConnectionPassword(null, true):

RequestError: An error was signalled by the server - ResponseError: wrong number of arguments for 'auth' command

If I use client.updateConnectionPassword("", true):

RequestError: An error was signalled by the server - ResponseError: AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?

Small note for the last case: I think client and server behavior should match on setting "" as a password (unsetting password).

    it.each([ProtocolVersion.RESP2, ProtocolVersion.RESP3])(
        `42`,
        async (protocol) => {
            await runTest(
                async (client: BaseClient) => {
                    if (client instanceof GlideClient) return;

                    const pwd = uuidv4();

                    expect(await client.configSet({ requirepass: pwd })).toEqual("OK");
console.log(1, Date.now());
                    expect(await client.updateConnectionPassword(pwd, true)).toEqual("OK");
console.log(2, Date.now());
                    expect(await client.configSet({ requirepass: "" })).toEqual("OK");
                    await client.customCommand(["CLIENT", "KILL", "TYPE", "NORMAL", "SKIPME", "NO"], {route: "allNodes"});
                    //await client.customCommand(["RESET"]);
console.log(3, Date.now());
                    expect(await client.updateConnectionPassword(null, true)).toEqual("OK");
                    //expect(await client.updateConnectionPassword("", true)).toEqual("OK");
console.log(4, Date.now());
                },
                protocol,
            );
        },
        20000,
    );
@Yury-Fridlyand Yury-Fridlyand added bug Something isn't working 1_2_candidate labels Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1_2_candidate bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant