]> 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)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 25 Oct 2016 18:01:22 +0000 (21:01 +0300)
The entire command line was being hashed instead of just the username.

src/director/doveadm-connection.c

index 926f4ebce48a940d7ae4a1414e50e6b7c871e79c..27012dc1971d6f2510b514f9ecef05e9226ec5c2 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");