From dd71ee76056b7b6ce0afbc9f74b887942162c450 Mon Sep 17 00:00:00 2001 From: Pradnya Bhagwat Date: Tue, 18 May 2021 19:18:08 +0530 Subject: [PATCH 1/4] Set maxlength attribute for username and password for input validation --- modules/st2-login/login.component.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/st2-login/login.component.js b/modules/st2-login/login.component.js index fdcab2f40..8241c9c96 100644 --- a/modules/st2-login/login.component.js +++ b/modules/st2-login/login.component.js @@ -219,6 +219,7 @@ export default class Login extends React.Component { placeholder="Username" required value={this.state.username} + maxLength="32" onChange={({ target: { value: username } }) => this.setState({ username })} /> @@ -230,6 +231,7 @@ export default class Login extends React.Component { placeholder="Password" required value={this.state.password} + maxLength="16" onChange={({ target: { value: password } }) => this.setState({ password })} /> From afbc1a14387598e5e6b80df4773e7df25455e795 Mon Sep 17 00:00:00 2001 From: Pradnya Bhagwat Date: Mon, 24 May 2021 15:51:23 +0530 Subject: [PATCH 2/4] Changed passowrd maxLength from 16 to 120 --- modules/st2-login/login.component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/st2-login/login.component.js b/modules/st2-login/login.component.js index 8241c9c96..845087cdb 100644 --- a/modules/st2-login/login.component.js +++ b/modules/st2-login/login.component.js @@ -231,7 +231,7 @@ export default class Login extends React.Component { placeholder="Password" required value={this.state.password} - maxLength="16" + maxLength="120" onChange={({ target: { value: password } }) => this.setState({ password })} /> From 59f02b9d7d5ed9f0c8982259b6267e6c2a0618d6 Mon Sep 17 00:00:00 2001 From: Pradnya Bhagwat Date: Thu, 3 Jun 2021 10:52:54 +0530 Subject: [PATCH 3/4] Changed Login Username maxLength from 32 to 120 --- modules/st2-login/login.component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/st2-login/login.component.js b/modules/st2-login/login.component.js index 845087cdb..0fdcdb123 100644 --- a/modules/st2-login/login.component.js +++ b/modules/st2-login/login.component.js @@ -219,7 +219,7 @@ export default class Login extends React.Component { placeholder="Username" required value={this.state.username} - maxLength="32" + maxLength="120" onChange={({ target: { value: username } }) => this.setState({ username })} /> From c46417763f2c2ad7e4bab85e8977861bb64abc58 Mon Sep 17 00:00:00 2001 From: W Chan Date: Thu, 3 Jun 2021 20:38:12 +0000 Subject: [PATCH 4/4] Change username and password to max length of 256 Per comment from https://github.com/StackStorm/st2/issues/5279, max length of username for htpasswd and linux system can be up to 256. --- modules/st2-login/login.component.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/st2-login/login.component.js b/modules/st2-login/login.component.js index 0fdcdb123..9c049c783 100644 --- a/modules/st2-login/login.component.js +++ b/modules/st2-login/login.component.js @@ -219,7 +219,7 @@ export default class Login extends React.Component { placeholder="Username" required value={this.state.username} - maxLength="120" + maxLength="256" onChange={({ target: { value: username } }) => this.setState({ username })} /> @@ -231,7 +231,7 @@ export default class Login extends React.Component { placeholder="Password" required value={this.state.password} - maxLength="120" + maxLength="256" onChange={({ target: { value: password } }) => this.setState({ password })} />