Skip to content

Commit

Permalink
Merge pull request #887 from pradnya-orchestral/OWASP_inputValidation
Browse files Browse the repository at this point in the history
Set maxLength attribute for username and password for input validation
  • Loading branch information
m4dcoder authored Jun 3, 2021
2 parents 23c59e6 + c464177 commit 7205c66
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/st2-login/login.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ export default class Login extends React.Component {
placeholder="Username"
required
value={this.state.username}
maxLength="256"
onChange={({ target: { value: username } }) => this.setState({ username })}
/>
</LoginRow>
Expand All @@ -230,6 +231,7 @@ export default class Login extends React.Component {
placeholder="Password"
required
value={this.state.password}
maxLength="256"
onChange={({ target: { value: password } }) => this.setState({ password })}
/>
</LoginRow>
Expand Down

0 comments on commit 7205c66

Please sign in to comment.