mirror of
https://github.com/minio/minio.git
synced 2026-11-26 07:24:49 +00:00
add min length validation to access key and secret key (#7721)
While changing the credentials through MinIO browser, Update button will be disabled if keys are lesser than minimum length. Fixes #7713
This commit is contained in:
1 parent
a73da7755e
commit
8528017ad3
4 files changed
+55
-32
No files matched your search
@@ -24,6 +24,7 @@ import classNames from "classnames"
|
||||
|
||||
import { Modal, ModalBody, ModalHeader } from "react-bootstrap"
|
||||
import InputGroup from "./InputGroup"
|
||||
import { ACCESS_KEY_MIN_LENGTH, SECRET_KEY_MIN_LENGTH } from "../constants"
|
||||
|
||||
export class ChangePasswordModal extends React.Component {
|
||||
constructor(props) {
|
||||
@@ -110,8 +111,8 @@ export class ChangePasswordModal extends React.Component {
|
||||
return (
|
||||
this.state.currentAccessKey.length > 0 &&
|
||||
this.state.currentSecretKey.length > 0 &&
|
||||
this.state.newAccessKey.length > 0 &&
|
||||
this.state.newSecretKey.length > 0
|
||||
this.state.newAccessKey.length >= ACCESS_KEY_MIN_LENGTH &&
|
||||
this.state.newSecretKey.length >= SECRET_KEY_MIN_LENGTH
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user