Skip to content

Commit 7205c66

Browse files
authored
Merge pull request #887 from pradnya-orchestral/OWASP_inputValidation
Set maxLength attribute for username and password for input validation
2 parents 23c59e6 + c464177 commit 7205c66

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/st2-login/login.component.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ export default class Login extends React.Component {
219219
placeholder="Username"
220220
required
221221
value={this.state.username}
222+
maxLength="256"
222223
onChange={({ target: { value: username } }) => this.setState({ username })}
223224
/>
224225
</LoginRow>
@@ -230,6 +231,7 @@ export default class Login extends React.Component {
230231
placeholder="Password"
231232
required
232233
value={this.state.password}
234+
maxLength="256"
233235
onChange={({ target: { value: password } }) => this.setState({ password })}
234236
/>
235237
</LoginRow>

0 commit comments

Comments
 (0)