Skip to content

Commit

Permalink
AddServerActivity: Fixed username regex - allow "-" in nicknames
Browse files Browse the repository at this point in the history
  • Loading branch information
pocmo committed Apr 18, 2010
1 parent f67594d commit 826f06f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/org/yaaic/activity/AddServerActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ private void validateIdentity() throws ValidationException
// <special> ::= '-' | '[' | ']' | '\' | '`' | '^' | '{' | '}'
// Chars that are not in RFC 1459 but are supported too:
// | and _
Pattern nickPattern = Pattern.compile("^[a-zA-Z][a-zA-Z0-9^-`\\[\\]{}|_\\\\]*$");
Pattern nickPattern = Pattern.compile("^[a-zA-Z][a-zA-Z0-9^\\-`\\[\\]{}|_\\\\]*$");
if (!nickPattern.matcher(nickname).matches()) {
throw new ValidationException("Invalid nickname");
}
Expand Down

0 comments on commit 826f06f

Please sign in to comment.