Commit d69ded37 authored by Christian Schudt's avatar Christian Schudt

OF-853: XEP-0077 Registration must return <not-acceptable/> if username or...

OF-853: XEP-0077 Registration must return <not-acceptable/> if username or password are unspecified.
parent 8093fed7
......@@ -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