MySQL Compile API による文字列組み込み関数の拒否
startswith、endswith、contains を使用する、MySQL を対象とした Compile API のポリシー生成された LIKE フィルターでは、MySQL のデフォルトの照合順序が大文字と小文字、アクセントの違いを無視するため、ポリシーで許可されていない行にも一致する可能性がありました。これらのポリシーはフィルターを生成せず、コンパイルに失敗するようになりました。
原文を表示
### Compile API: no `startswith`, `endswith` or `contains` for MySQL ([#9624](https://github.com/open-policy-agent/opa/issues/9624)) Breaking change: the MySQL target rejects `startswith`, `endswith` and `contains`, as the SQLite target already did. They were translated to `LIKE`, which is case- and accent-insensitive in MySQL's default collations, so `startswith(input.fruits.name, "APP")` also matched `apple`. Policies using them now fail to compile for `application/vnd.opa.sql.mysql+json`, and for multitarget requests that include `mysql`. Reported by @kianwang0610, authored by @srenatus - Hardening of the MySQL Compile API target: use of `startswith`, `endswith` and `contains` built-in functions is rejectedgithub.com/open-policy-agent/opa/releases/tag/v1.23.0