Skip to content

Commit

Permalink
fix: use zsv_strincmp_ascii to avoid utf8proc dependency
Browse files Browse the repository at this point in the history
Co-Authored-By: Matt Wong <[email protected]>
  • Loading branch information
devin-ai-integration[bot] and liquidaty committed Dec 20, 2024
1 parent 58bb194 commit 0b95866
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/utils/overwrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static const char *get_safe_sql_query(const char *user_sql) {
return default_query;

// Validate that it's a SELECT query and contains required table/columns
if (!zsv_strincmp((const unsigned char *)"select ", strlen("select "), (const unsigned char *)user_sql,
if (!zsv_strincmp_ascii((const unsigned char *)"select ", strlen("select "), (const unsigned char *)user_sql,
strlen("select ")) &&
strstr(user_sql, "from overwrites")) {
return user_sql; // Allow the original query if it's safe and uses the right table
Expand Down

0 comments on commit 0b95866

Please sign in to comment.