Skip to content

Commit

Permalink
Fix mosquitto_passwd -b using username as password.
Browse files Browse the repository at this point in the history
Only applies if if `-c` is not also used.

Closes #1949. Thanks to J. Augusto de Oliveira.
  • Loading branch information
ralight committed Dec 13, 2020
1 parent abac672 commit f63386b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog.txt
Expand Up @@ -2,6 +2,10 @@ Broker:
- Fix excessive CPU use on non-Linux systems when the open file limit is set
high. Closes #1947.

Apps:
- Fix `mosquitto_passwd -b` using username as password (not if `-c` is also
used). Closes #1949.

Build:
- Fix `install` target when using WITH_CJSON=no. Closes #1938.

Expand Down
2 changes: 1 addition & 1 deletion apps/mosquitto_passwd/mosquitto_passwd.c
Expand Up @@ -505,7 +505,7 @@ int main(int argc, char *argv[])
}else if(batch_mode == true && idx+3 == argc){
password_file_tmp = argv[idx];
username = argv[idx+1];
password_cmd = argv[idx+1];
password_cmd = argv[idx+2];
}else if(batch_mode == false && idx+2 == argc){
password_file_tmp = argv[idx];
username = argv[idx+1];
Expand Down

0 comments on commit f63386b

Please sign in to comment.