Commit 9e14d4f7 authored by Dave Cridland's avatar Dave Cridland Committed by GitHub

Merge pull request #699 from surevine/pr546

OF-1240 Disallow empty nicknames in rooms with reserved nicknames
parents 1fb12d9a 12de52b9
...@@ -1620,6 +1620,8 @@ public class LocalMUCRoom implements MUCRoom, GroupEventListener { ...@@ -1620,6 +1620,8 @@ public class LocalMUCRoom implements MUCRoom, GroupEventListener {
if (!nickname.equals(members.get(bareJID))) { if (!nickname.equals(members.get(bareJID))) {
throw new ConflictException(); throw new ConflictException();
} }
} else if (isLoginRestrictedToNickname() && (nickname == null || nickname.trim().length() == 0)) {
throw new ConflictException();
} }
// Check that the room always has an owner // Check that the room always has an owner
if (owners.contains(bareJID) && owners.size() == 1) { if (owners.contains(bareJID) && owners.size() == 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment