- if (msg->payload.authenticate->password && strncmp(getStrConf(PASSPHRASE), msg->payload.authenticate->password, MAX_TEXT) != 0) {
- char buf[64];
- sprintf(buf, "Wrong server password");
- Log_debug("Wrong server password: %s", msg->payload.authenticate->password);
- sendServerReject(client, buf, MUMBLE_PROTO__REJECT__REJECT_TYPE__WrongServerPW);
- goto disconnect;
+ if (strlen(getStrConf(PASSPHRASE)) > 0) {
+ if (!msg->payload.authenticate->password || strncmp(getStrConf(PASSPHRASE), msg->payload.authenticate->password, MAX_TEXT) != 0) {
+ char buf[64];
+ sprintf(buf, "Wrong server password");
+ sendServerReject(client, buf, MUMBLE_PROTO__REJECT__REJECT_TYPE__WrongServerPW);
+ Log_debug("Wrong server password: %s", msg->payload.authenticate->password);
+ goto disconnect;
+ }