Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

executor,ast: check password format for 'create user identified by password XXX' #5948

Merged
merged 7 commits into from
Mar 6, 2018

Conversation

tiancaiamao
Copy link
Contributor

'create user xxx identified by yyy', yyy can be any text
'create user xxx identified by password yyy', yyy must be a hash string generated by
password(), it begin with * and has length 41

@zz-jason @jackysp @winkyao

…ssword XXX'

'create user xxx identified by yyy', yyy can be any text
'create user xxx identified by password yyy', yyy must be a hash string generated by
password(), it begin with * and has length 41
ast/misc.go Outdated
return opt.HashString, true
}

func maybePasswordString(str string) bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function name is weird :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, any suggestion? @jackysp

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about "isPasswordValid" ?

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 5, 2018
@zz-jason
Copy link
Member

zz-jason commented Mar 5, 2018

/run-all-tests

@tiancaiamao tiancaiamao force-pushed the check-password-format branch from 2ce3f9c to b64c4ac Compare March 6, 2018 02:38
@tiancaiamao
Copy link
Contributor Author

/run-all-tests

Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tiancaiamao tiancaiamao merged commit 928582c into pingcap:master Mar 6, 2018
@tiancaiamao tiancaiamao deleted the check-password-format branch March 6, 2018 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants