-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Conversation
…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 { |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, any suggestion? @jackysp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about "isPasswordValid" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
2ce3f9c
to
b64c4ac
Compare
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
'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