توضیح (فارسی)
نقص احراز مجوز نادرست در ash_sql اجازه میدهد که یک caller در یک برنامه چندنقشه aggregate مقادیری را دریافت کند که از ردیفهای tenant دیگر محاسبه شده است. یک aggregate میتواند با استفاده از tenant option در Ash.Query.aggregate/5 به آن tenant داده شود. AshSql.Aggregate.Lateral.add_aggregates/6 فقط بخشی از چنین aggregate را در آن tenant میخواند. field که aggregate یا calculation است و آن چیزی که filter و sort aggregate به آن اشاره میکنند، در tenant کوئری حاکم خوانده میشوند، و با نداشتن tenant روی آن query، آنها در تمام tenant ها خوانده میشوند. Aggregates روی همان relationship به صورت یک lateral join گروه شدند، بدون در نظر گرفتن tenant های خود، و با strategy(:context) multitenancy aggregate در schema کوئری حاکم خوانده میشود. این مشکل ash_sql را از 0.1.0 تا قبل از 0.9.1 تأثیر میگذارد.
Original description (English)
Incorrect Authorization vulnerability in ash_sql allows a caller in a multitenant application to receive aggregate values computed from another tenant's rows.
An aggregate can be given a tenant with the tenant option of Ash.Query.aggregate/5. AshSql.Aggregate.Lateral.add_aggregates/6 read only part of such an aggregate in that tenant. A field that is an aggregate or calculation, and what the aggregate's filter and sort refer to, were read in the tenant of the enclosing query, and with no tenant on that query they were read across every tenant. Aggregates over the same relationship were grouped into one lateral join without regard to their tenants, and with strategy(:context) multitenancy the aggregate was read in the schema of the enclosing query.
This issue affects ash_sql: from 0.1.0 before 0.9.1.