Skip to content

Commit

Permalink
style: update formatting to match clang-format requirements
Browse files Browse the repository at this point in the history
Co-Authored-By: Matt Wong <matt@liquidaty.com>
  • Loading branch information
devin-ai-integration[bot] and liquidaty committed Dec 20, 2024
1 parent cb6a74f commit e16ce21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/utils/overwrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ static const char *get_safe_sql_query(const char *user_sql) {
return "select row, column, value, timestamp, author from overwrites order by row, column";

// 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, strlen("select ")) &&
if (!zsv_strincmp((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 e16ce21

Please sign in to comment.