From eadf3d5353f5de7613c90e11f9800a31df0726aa Mon Sep 17 00:00:00 2001 From: Ivan Vasilov Date: Tue, 23 Apr 2024 21:12:58 +0200 Subject: [PATCH] fix: Escape the escape chars so that `auth_rls_initplan` rule works properly (#23176) Escape the escape chars so that auth_rls_initplan rule works properly. --- apps/studio/data/lint/lint-query.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/studio/data/lint/lint-query.ts b/apps/studio/data/lint/lint-query.ts index 938223f4b30..5c290d45e79 100644 --- a/apps/studio/data/lint/lint-query.ts +++ b/apps/studio/data/lint/lint-query.ts @@ -221,16 +221,16 @@ where and ( ( -- Example: auth.uid() - qual ~ '(auth)\.(uid|jwt|role|email)\(\)' + qual ~ '(auth)\\.(uid|jwt|role|email)\\(\\)' -- Example: select auth.uid() - and lower(qual) !~ 'select\s+(auth)\.(uid|jwt|role|email)\(\)' + and lower(qual) !~ 'select\\s+(auth)\\.(uid|jwt|role|email)\\(\\)' ) or ( -- Example: auth.uid() - with_check ~ '(auth)\.(uid|jwt|role|email)\(\)' + with_check ~ '(auth)\\.(uid|jwt|role|email)\\(\\)' -- Example: select auth.uid() - and lower(with_check) !~ 'select\s+(auth)\.(uid|jwt|role|email)\(\)' + and lower(with_check) !~ 'select\\s+(auth)\\.(uid|jwt|role|email)\\(\\)' ) )) union all