You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Saved search references with overlapping IDs or names depend on their order #9483
Combining saved searches whose names or IDs share a prefix can expand the longer reference as the shorter one and leave part of the original token in the search. The result depends on the order of otherwise equivalent OR clauses.
To reproduce
Have articles by Alice, Bob, and an unrelated author.
Save News with the search author:Alice and Newsletter with author:Bob.
Search for search:Newsletter OR search:News.
Compare with search:News OR search:Newsletter.
The first search expands to author:Alice letter OR author:Alice and returns only Alice's articles. The reverse order expands correctly to author:Alice OR author:Bob and returns both authors.
Numeric references have the same problem. With saved query 1 set to author:Alice and query 10 set to author:Bob:
Input
Actual expansion
Expected expansion
S:10 OR S:1
author:Alice 0 OR author:Alice
author:Bob OR author:Alice
S:1 OR S:10
author:Alice OR author:Bob
Same as actual
The unexpanded serialisation is also affected: S:1 S:10 becomes 0 S:1 S:10, and search:News search:Newsletter becomes letter search:News search:Newsletter.
Expected behaviour
Each saved query reference should expand independently. Changing the order of OR clauses should not remove an author's matching articles. Preserving an unexpanded search should not introduce suffixes from another reference.
PHP 8.5.8, built-in local PHP server, macOS 27.0.1 arm64
SQLite 3.53.4 with a synthetic feed and three local articles; no feed fetch required
Ego Lite / Chromium 154
The parser also reproduces independently of the browser. This is a reference replacement problem, separate from #5674's feed/category/state scope issue. Searches of existing issues/PRs and comparison with #8395 and #8543 did not find a matching fix as of 2026-10-22.
A focused fix and nine regression cases are prepared, and I will link the draft pull request here through its closing reference. The fix covers reference expansion and preservation of unexpanded searches.
Activity
Fix overlapping saved search references (#9484)
Alkarex commentedon Nov 1, 2026
#9524