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

I encountered a problem while using mysql_query_rules #4797

Open
ITBrotherAYi opened this issue Jan 20, 2025 · 0 comments
Open

I encountered a problem while using mysql_query_rules #4797

ITBrotherAYi opened this issue Jan 20, 2025 · 0 comments

Comments

@ITBrotherAYi
Copy link

I encountered a problem while using mysql_query_rules:
My rule is to match whether the SQL contains a 'where' query condition, and the corresponding SQL is: INSERT INTO mysql_query_rules ( rule_id, active, username, match_pattern, error_msg, apply, flagOUT )
VALUES
( 103, 1, 'root', '^UPDATE\s+[^\s]+\s+SET\s+(?!\sWHERE\s+).$', 'The Update statement must contain a valid WHERE condition.', 1, 14 );
Executing SQL: update sys_user SET user_name='test 'can match, but in reality, the executed SQL has line breaks. How should we handle line breaks? For example:
update sys_user
SET
user_name='test'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant