Skip to content

Commit

Permalink
director: Make sure user's timestamp isn't set to future
Browse files Browse the repository at this point in the history
The sending director could have the system clock slightly in the future.
  • Loading branch information
sirainen committed Nov 25, 2017
1 parent 0bd35db commit a419c03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/director/director-connection.c
Expand Up @@ -718,6 +718,10 @@ director_handshake_cmd_user(struct director_connection *conn,
return FALSE;
}

if (timestamp > ioloop_time) {
/* make sure we don't set user's timestamp to future */
timestamp = ioloop_time;
}
(void)director_user_refresh(conn, username_hash, host,
timestamp, weak, &forced, &user);
if (user->timestamp < timestamp) {
Expand Down

0 comments on commit a419c03

Please sign in to comment.