Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Update username regular expression:
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Jun 1, 2015
1 parent bcd1897 commit 1e5f1b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/release-notes.md
Expand Up @@ -40,6 +40,7 @@ Example usage in html file: `<link rel="shortcut icon" href="#{assets['img/logo/
* [1165930](https://bugzilla.redhat.com/show_bug.cgi?id=1165930) - 'Copy from previous version' shows if an obsolete version exists
* [1098362](https://bugzilla.redhat.com/show_bug.cgi?id=1098362) - download link in editor doesn't encode properly and result in 404
* [1225689](https://bugzilla.redhat.com/show_bug.cgi?id=1225689) - [Project Version View] Failed to load entries when the doc id contains characters that should be URL encoded
* [981498](https://bugzilla.redhat.com/show_bug.cgi?id=981498) - No underscore sanity checking on creating usernames

-----------------------

Expand Down
Expand Up @@ -212,7 +212,7 @@ public void togglePasswordVisible() {
@Feature(summary = "The user must enter at least one alphanumeric " +
"character in their username",
bugzilla = 981498)
@Test(expected = AssertionError.class)
@Test
public void bug981498_underscoreRules() {
fields.put("email", "bug981498test@example.com");
fields.put("username", "______");
Expand Down
Expand Up @@ -91,7 +91,7 @@ public void setUsername(String username) {

@NotEmpty
@Size(min = 3, max = 20)
@Pattern(regexp = "^[a-z\\d_]{3,20}$",
@Pattern(regexp = "^([a-z\\d][a-z\\d_]*){3,20}$",
message = "{validation.username.constraints}")
public String getUsername() {
return username;
Expand Down

0 comments on commit 1e5f1b1

Please sign in to comment.