diff --git a/ChangeLog.txt b/ChangeLog.txt index ded3a8e2..28efef26 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,6 @@ +Broker: +- mosquitto_password now forbids the : character. Closes #1833. + Client library: - Fix send quota being incorrecly reset on reconnect. Closes #1822. - Don't use logging until log mutex is initialised. Closes #1819. diff --git a/src/mosquitto_passwd.c b/src/mosquitto_passwd.c index a86071f9..90f2ff43 100644 --- a/src/mosquitto_passwd.c +++ b/src/mosquitto_passwd.c @@ -598,6 +598,10 @@ int main(int argc, char *argv[]) return 1; } + if(strchr(username, ':')){ + fprintf(stderr, "Error: Username must not contain the ':' character.\n"); + return 1; + } #ifdef WIN32 password_file = _fullpath(NULL, password_file_tmp, 0); if(!password_file){