Skip to content

Commit

Permalink
auth: Fix assert-crash if auth client sends 0 as ID
Browse files Browse the repository at this point in the history
This could be triggered by anyone having (local) write access to the auth
socket.
  • Loading branch information
sirainen committed May 21, 2018
1 parent 2d4b81b commit eb08f80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/auth/auth-request-handler.c
Expand Up @@ -490,7 +490,7 @@ bool auth_request_handler_auth_begin(struct auth_request_handler *handler,
/* <id> <mechanism> [...] */
list = t_strsplit_tabescaped(args);
if (list[0] == NULL || list[1] == NULL ||
str_to_uint(list[0], &id) < 0) {
str_to_uint(list[0], &id) < 0 || id == 0) {
i_error("BUG: Authentication client %u "
"sent broken AUTH request", handler->client_pid);
return FALSE;
Expand Down

0 comments on commit eb08f80

Please sign in to comment.