Skip to content

Commit

Permalink
Quotes should not be a valid character in a username
Browse files Browse the repository at this point in the history
  • Loading branch information
jdubois committed Feb 20, 2018
1 parent 65f2ef0 commit 34ff6f3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h1 jhiTranslate="register.title">Registration</h1>
<div class="form-group">
<label class="form-control-label" for="login" jhiTranslate="global.form.username">Username</label>
<input type="text" class="form-control" [(ngModel)]="registerAccount.login" id="login" name="login" #login="ngModel" placeholder="{{'global.form.username.placeholder' | translate}}"
required minlength="1" maxlength="50" pattern="^[_'.@A-Za-z0-9-]*$">
required minlength="1" maxlength="50" pattern="^[_.@A-Za-z0-9-]*$">
<div *ngIf="login.dirty && login.invalid">
<small class="form-text text-danger" *ngIf="login.errors.required" jhiTranslate="register.messages.validate.login.required">
Your username is required.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h4 class="modal-title" id="myUserLabel" jhiTranslate="userManagement.home.creat
<div class="form-group">
<label class="form-control-label" jhiTranslate="userManagement.login">Login</label>
<input type="text" class="form-control" name="login" #loginInput="ngModel"
[(ngModel)]="user.login" required minlength="1" maxlength="50" pattern="^[_'.@A-Za-z0-9-]*$">
[(ngModel)]="user.login" required minlength="1" maxlength="50" pattern="^[_.@A-Za-z0-9-]*$">

<div *ngIf="loginInput.dirty && loginInput.invalid">
<small class="form-text text-danger"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
public final class Constants {

// Regex for acceptable logins
public static final String LOGIN_REGEX = "^[_'.@A-Za-z0-9-]*$";
public static final String LOGIN_REGEX = "^[_.@A-Za-z0-9-]*$";

public static final String SYSTEM_ACCOUNT = "system";
public static final String ANONYMOUS_USER = "anonymoususer";
Expand Down

0 comments on commit 34ff6f3

Please sign in to comment.