Skip to content

Commit

Permalink
Merge pull request #4434 from cnsgithub/fixes-4420-inputvalidation-in…
Browse files Browse the repository at this point in the history
…puttextarea

fix #4420 - inputTextarea: lack of user input validation (maxlength)
  • Loading branch information
tandraschko committed Jan 15, 2019
2 parents e2d9462 + 619d270 commit 1b0e36e
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public void decode(FacesContext context, UIComponent component) {
Map<String, String> params = context.getExternalContext().getRequestParameterMap();
String submittedValue = params.get(clientId);

if (submittedValue != null && submittedValue.length() > inputTextarea.getMaxlength()) {
return;
}

inputTextarea.setSubmittedValue(submittedValue);

//AutoComplete event
Expand Down

0 comments on commit 1b0e36e

Please sign in to comment.