Fix SHOW TTL wildcard path scope - #18763
Conversation
Caideyipi
left a comment
There was a problem hiding this comment.
Blocking: the new code passes queryScope to intersectWithFullPathPrefixTree as the full-path/prefix-tree argument, but SHOW TTL accepts general prefixPath patterns. A query such as SHOW TTL ON root.*.** is valid, while the helper explicitly requires its second argument to contain only full paths or literal prefix patterns such as root.sg.**.
I reproduced this on this commit with READ_SCHEMA granted only on root.ttl_scope_a.** and TTL rules on root.ttl_scope_a, root.ttl_scope_a.g_0., and root.ttl_scope_b. SHOW TTL ON root.*. returned 0 rows, although it should return the two authorized root.ttl_scope_a rules. root.ttl_*.** has the same unsupported shape.
Please handle wildcards before the trailing ** when intersecting the query and authority scopes, and add regression coverage for these cases.
cab5b7e to
9395262
Compare
Description
Content: Fix wildcard TTL queries
Intersect the requested SHOW TTL ON .** path with the authority scope before querying ConfigNode, so unrelated TTL rules are excluded. Queries without a trailing ** retain their existing behavior.
This PR has:
Key changed/added classes