Skip to content

Commit

Permalink
Fix display message for unsecure http redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
syntrydy committed Apr 13, 2020
1 parent b08cfed commit 6bddf2e
Showing 1 changed file with 11 additions and 3 deletions.
Expand Up @@ -550,11 +550,19 @@ public void acceptSelectLoginUri() {
}
if (!this.loginUris.contains(this.availableLoginUri) && checkWhiteListRedirectUris(availableLoginUri)
&& checkBlackListRedirectUris(availableLoginUri)) {
if (isAcceptable(this.availableLoginUri)) {
boolean acceptable = isAcceptable(this.availableLoginUri);
if (acceptable) {
this.loginUris.add(this.availableLoginUri);
} else {
facesMessages.add(FacesMessage.SEVERITY_ERROR, "A sector identifier must be defined first.",
"A sector identifier must be defined first.");
try {
if(getProtocol(availableLoginUri).equalsIgnoreCase("http")) {
facesMessages.add(FacesMessage.SEVERITY_ERROR,"http schema is only allow for local development.");
}else {
facesMessages.add(FacesMessage.SEVERITY_ERROR, "A sector identifier must be defined first.");
}
} catch (MalformedURLException e) {
}

}

} else {
Expand Down

0 comments on commit 6bddf2e

Please sign in to comment.