-
Notifications
You must be signed in to change notification settings - Fork 280
refactor some cdc code - phase 1 #21656
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
base: main
Are you sure you want to change the base?
Conversation
incrConfig string, | ||
additionalConfigStr string, | ||
) string { | ||
return fmt.Sprintf( |
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.
All these Sprintf based SQL construction are subject to SQL injection. I wonder if we can make it use param binding -- or even if not possible, values be systematically escaped here.
// compositedUriInfo uri according to the format: mysql://root:[email protected]:6001 | ||
// if valid, return true and extracted info | ||
// !!!NOTE!!! | ||
// user and password does not have the special character ( ':' '@' ) |
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.
Is this enforced somehow/somewhere? Otherwise seems to me, the only way is to encode/decode this with &XXX;
Or some better/smarter encode/decode scheme.
What type of PR is this?
Which issue(s) this PR fixes:
issue #21017
What this PR does / why we need it:
refactor some cdc code