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

properly escape single quotes values in PK and RK Uri paths #21650

Merged
merged 3 commits into from
Jun 7, 2021

Conversation

christothes
Copy link
Member

@christothes christothes commented Jun 7, 2021

fixes #21635

@ghost ghost added the Tables label Jun 7, 2021
@christothes christothes requested review from jsquire and pakrym June 7, 2021 15:06
@christothes christothes self-assigned this Jun 7, 2021
@christothes christothes added the Client This issue points to a problem in the data-plane of the library. label Jun 7, 2021

internal static string escapeStringValue(string s) => s.Replace("'", "''");
internal static StringBuilder escapeStringValue(StringBuilder s) => s.Replace("'", "''");
internal static string escapeStringValue(char s) => s.ToString().Replace("'", "''");
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: why do you hate perf? :)

Copy link
Member Author

Choose a reason for hiding this comment

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

You can't give em all the perf at once ;)

@christothes christothes enabled auto-merge (squash) June 7, 2021 17:10
@christothes christothes merged commit f5b425d into Azure:master Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Tables
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Single quote in PartitionKey not serialized properly in PATCH entity
3 participants