Skip to content

Add esc_sql_ident(), catering for reserved word column names.#23

Merged
schlessera merged 1 commit into
masterfrom
esc_sql_ident
Aug 14, 2017
Merged

Add esc_sql_ident(), catering for reserved word column names.#23
schlessera merged 1 commit into
masterfrom
esc_sql_ident

Conversation

@gitlost
Copy link
Copy Markdown
Contributor

@gitlost gitlost commented Aug 11, 2017

PR #4

Adds esc_sql_ident() func to backtick column/table names and uses it throughout, though the only real fixes (excluding the unlikely case of backticks in column/table names) is in php_handle_col(), where primary keys weren't escaped, as mentioned in the original PR, and esc_sql()was used for $col_sql.

(A similar fix needs to be done for db search.)

Also adds note about the double escaping in the WP <= 3.9 part of esc_like() which I thought was wrong but turns out to be necessary.

@danielbachhuber
Copy link
Copy Markdown
Member

@gitlost Are you ready for a review on this or is it on hold?

@gitlost gitlost requested a review from a team August 14, 2017 17:29
@schlessera schlessera added the bug label Aug 14, 2017
@schlessera schlessera added this to the 1.0.4 milestone Aug 14, 2017
@schlessera schlessera merged commit a73526d into master Aug 14, 2017
@schlessera schlessera deleted the esc_sql_ident branch August 14, 2017 18:44
@danielbachhuber danielbachhuber added the command:search-replace Related to 'search-replace' command label Aug 14, 2017
danielbachhuber pushed a commit that referenced this pull request Nov 18, 2022
Add esc_sql_ident(), catering for reserved word column names.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug command:search-replace Related to 'search-replace' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants