Commit 6a105ae8 authored by Tom Evans's avatar Tom Evans

Merge pull request #119 from sco0ter/of853

OF-853: XEP-0077 Registration must return <not-acceptable/> if username ...
parents 8093fed7 d69ded37
......@@ -160,6 +160,12 @@ public class UserManager implements IQResultListener {
if (provider.isReadOnly()) {
throw new UnsupportedOperationException("User provider is read-only.");
}
if (username == null || username.isEmpty()) {
throw new IllegalArgumentException("Null or empty username.");
}
if (password == null || password.isEmpty()) {
throw new IllegalArgumentException("Null or empty password.");
}
// Make sure that the username is valid.
try {
username = Stringprep.nodeprep(username);
......
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