[BUG] Plugin exclusion search retains matches because negative predicates use OR
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
Direzione di ricerca
Il predicato errato si trova in shenyu-admin/src/main/resources/mappers/plugin-sqlmap.xml intorno alle righe 255-260 e in namespace-plugin-rel-sqlmap.xml intorno alle righe 179-184; inizia dagli statement searchByCondition e da come PluginServiceImpl.searchByCondition() passa il valore di excluded. Sostituisci l'OR tra i predicati negativi name e role con AND, oppure nega la corrispondenza positiva combinata, in entrambi i mapper. È completato quando escludere 'divide' rimuove la riga (divide, Proxy) dai dati H2 di seed, (request, HttpProcess) viene mantenuta e i campi nullable continuano a comportarsi come prima.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Current behavior
Plugin search combines exclusions across name and role with OR:
name NOT LIKE :excluded OR role NOT LIKE :excluded
For the seeded plugin name='divide', role='Proxy', excluding divide still returns the plugin because role NOT LIKE '%divide%' is true. Excluding a role likewise retains its plugins whenever their names do not contain that role. A row is removed only if both columns contain the excluded term.
Locations
PluginServiceImpl.searchByCondition() initializes the keyword!excluded syntax before calling the mapper. NamespacePluginQueryCondition inherits the same exclusion field, and its paged search uses the namespace mapper.
Expected behavior / impact
P3 / Low. Exclusion search should remove a plugin when either searchable field contains the excluded term, i.e. negate the positive predicate (name LIKE term OR role LIKE term). This affects administrative search results and pagination, rather than gateway traffic.
Reproduction and evidence
- Use plugins
(divide, Proxy)and(request, HttpProcess); these name/role combinations exist in the H2 seed data. - Run a plugin search with
excluded='divide'(or the ordinary plugin search keyword!divide). - Expected:
requestonly. Current predicate: bothdivideandrequest.
A local SQL predicate probe extracted each exclusion clause directly from its current MyBatis XML and executed it against these two rows in an in-memory SQLite database. Both returned the excluded plugin. The probe verifies standard SQL boolean semantics; a full running Admin/MyBatis request was not exercised.
Suggested fix
Use AND between the negative predicates in both mappers, or an equivalent explicit negation of the positive predicate. Preserve intended handling of nullable fields and existing include/exclude keyword semantics.
Related existing work
Searched the 3,074-issue baseline, 85 open PR titles, and live plugin/excluded searches. #6614 is a namespace-plugin enabled result-map typo; #6717 concerns the separate nameExistedExclude query and a missing column. Neither addresses boolean exclusion logic in these searchByCondition statements. The two affected mappers are grouped here because they share the same root cause.
Environment
Apache ShenYu 2.7.2-SNAPSHOT, master@66d7d954ca37d651a5ad916f988a8081157a7ab4. Unit-test and CI issue categories excluded.
- Lingua principale
- Java
- Stelle
- 8.9k
- Fork
- 3.1k
- Merge medio
- 2g 2h
- PR unite (30g)
- 414
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/shenyu
-
[Task][Docs] Adapt AGENTS.md working principles to ShenYu and refresh build factsForse già presa @qiaolezi001 l’ha presa oggi. Apertain: document type: enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG] Boolean tars parameter parsed via Byte.valueOf → NumberFormatExceptionForse già presa @yangjj-iso l’ha presa 13 giorni fa. Apertaplugin: tars priority: medium type: bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
apache/shenyu#6736 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] RuleDataRefresh.refresh() NPE on null data / no-op on empty data (HTTP sync)Forse già presa @wy471x l’ha presa 26 giorni fa. Apertadata-sync: http priority: high type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apache/shenyu#6663 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] SelectorDataRefresh.refresh() NPE on null data / no-op on empty data (HTTP sync)Forse già presa @wy471x l’ha presa 26 giorni fa. Apertadata-sync: http priority: high type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apache/shenyu#6662 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] ShenyuMcpResponseDecorator reads buffer before super.writeWith, corrupting forwarded bodyForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertafeature: plugin priority: high type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/shenyu#6641 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/shenyu
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
oracle/graalvm-reachability-metadata#11472 ·
I maintainer di solito rispondono entro 1 giorno
-
OkHttp versions 5.4.0+ no longer include baseline-prof.txtForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 83/100
lysine-dev/okhttp#9828 ·
I maintainer di solito rispondono entro 1 giorno
-
status: waiting-for-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
spring-projects/spring-ai#7269 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 89/100
objectionary/hone-maven-plugin#1353 ·
I maintainer di solito rispondono entro 9 giorni
-
ClassNotFoundException: io.netty.channel.kqueue.KQueueEventLoop stack trace printed during native build on main (Netty 4.2 removed the class)Forse già presa @gastaldi l’ha presa oggi. Apertaarea/netty kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
quarkusio/quarkus#57939 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno