Skip to content

Commit 1dba6cd

Browse files
committed
feat: ignore supplied password for passwordless room servers
1 parent 5f31979 commit 1dba6cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/simple_room_server/MyMesh.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ void MyMesh::onAnonDataRecv(mesh::Packet *packet, const uint8_t *secret, const m
303303
if (strcmp((char *)&data[8], _prefs.password) == 0) { // check for valid admin password
304304
perm = PERM_ACL_ADMIN;
305305
} else {
306-
if (strcmp((char *)&data[8], _prefs.guest_password) == 0) { // check the room/public password
306+
if (strlen(_prefs.guest_password) == 0 || strcmp((char *)&data[8], _prefs.guest_password) == 0) { // check the room/public password
307307
perm = PERM_ACL_READ_WRITE;
308308
} else if (_prefs.allow_read_only) {
309309
perm = PERM_ACL_GUEST;

0 commit comments

Comments
 (0)