mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
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.
This commit is contained in:
1 parent
e1b6db4b43
commit
eadf3d5353
1 file changed
+4
-4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user