class Ransack::Context
def key_within_depth_limit?(key)
an over-long key is treated as unknown rather than parsed
superlinear in the segment count and the key is attacker-controlled, so
parse. The attribute / association / predicate parsing that follows is
False when a key has more `_`-separated segments than Ransack will
def key_within_depth_limit?(key) key.to_s.count(Constants::UNDERSCORE) <= Constants::MAX_KEY_DEPTH end