]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
director: USER-MOVE didn't handle non-hash username correctly.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 24 Oct 2016 17:20:09 +0000 (20:20 +0300)
committerGitLab <gitlab@git.dovecot.net>
Tue, 25 Oct 2016 17:33:27 +0000 (20:33 +0300)
The entire command line was being hashed instead of just the username.

src/director/doveadm-connection.c

index f179c693e39823983c2dc787bd1569bbf8d22f2f..dcd60fb0dba5515d530c72fdb84d0c8f797812b5 100644 (file)
@@ -576,7 +576,7 @@ doveadm_cmd_user_move(struct doveadm_connection *conn, const char *line)
        }
 
        if (str_to_uint(args[0], &username_hash) < 0)
-               username_hash = user_directory_get_username_hash(conn->dir->users, line);
+               username_hash = user_directory_get_username_hash(conn->dir->users, args[0]);
        user = user_directory_lookup(conn->dir->users, username_hash);
        if (user != NULL && user->kill_state != USER_KILL_STATE_NONE) {
                o_stream_nsend_str(conn->output, "TRYAGAIN\n");