-
Notifications
You must be signed in to change notification settings - Fork 129
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
Bugfix/wild backslash attacks again in insert stmnt #259
base: main
Are you sure you want to change the base?
Bugfix/wild backslash attacks again in insert stmnt #259
Conversation
a690188
to
81c138a
Compare
Ok I see now that this utils.rs are common for mysql and psql, escaping that works in mysql doesn't work in psql and vice versa, this need to be reconsidered. |
Hi guys, some tests are failing. Let me know if you need some help :) Thanks for your contribution |
Hi, thanks, I'll left this PR as is for now, but it needs to be done differently and slash escaping must be with different strategy for mysql and postgresql. I found yet another problem with EOF when in dump script find more than 49 new lines, this seems to be very wrong, at least in my dump there are places with such new lines and dump ends importing too early, for now I commented it out, but I'm not sure if this is ok. And yet another problem with file order, looks like Example:
|
@michalq Do you think it's ready to be merged? (I didn't review it yet) |
It definitely should not be merged, it fixes escape behaviour for postgres but at the same time it breaks mysql since there is one method for both dbs, needs more work. |
Database: PostgreSQL 13.7
Replibyte assumed that
'
can be escaped by\
and'
, but it can only be escaped by'
, so this statementselect 'test \\' test';
assumed as correct in Replibyte is incorrect in reality.And this
select 'test test \';
assumed as incorrect is correct in reality.