supabase-py icon indicating copy to clipboard operation
supabase-py copied to clipboard

eq does not work when your field name is "apikey"

Open Akiren opened this issue 3 years ago • 2 comments

If your table has a field called "apikey" queries will always be truthy regardless of if they really are

data = supabase.table('users').select('email, api_key').eq('api_key', 'fakekey').execute().dict()

data will always return data... Found the javascript issue after 2.5 hours of questioning the nature of reality.

This bug existed and was fixed in the javascript version of supabase https://github.com/supabase/supabase/issues/5465

Akiren avatar Jul 01 '22 23:07 Akiren

Hi! Thanks for creating the issue. As far as I can read, rhis issue wasn't solved, but only documented. They solution the supabase team gives is to name that column with a prefix user_apikey.

dreinon avatar Jul 02 '22 00:07 dreinon

I'll mark this issue as a wontfix until it's solved upstream

anand2312 avatar Jul 02 '22 01:07 anand2312