Filtering an :atom attribute with unsafe_to_atom? can exhaust the BEAM atom table in Ash
ash-project ash
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| ash-project ash |
| No fix yet |
| ash-project ash |
| No fix yet |
Original description
Ash stores :atom-typed attributes as strings and compares them as strings. When such an attribute is referenced in a filter, the comparison value is coerced through Ash.Type.Atom. Because the type defined no coerce/2 callback, coercion fell back to the default (cast_input/2), which calls String.to_atom/1 when the attribute is configured with the unsafe_to_atom?: true constraint.