locallibrary: a {secret:} filled into a URL query can come back to its plugin

Aperta Adatta ai principianti
#285 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
backend, security

Direzione di ricerca

Leggi crates/locallibrary/src/plugin/net.rs intorno alla riga 187 e segui la riscrittura esistente dei valori {account:<id>} negli URL delle richieste restituiti in eco. Applica lo stesso comportamento ai valori {secret:<key>} inseriti nei parametri di query, poi controlla i test pertinenti per gli URL restituiti in eco. Il lavoro è completato quando una risposta che restituisce un URL in eco non espone più al plugin il secret inserito.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug locallibrary: plugins

Since cutenode/localnetwork#263, when an answer says a request's address back (in a header or its text), the host turns an account token it put in the query back into {account:<id>}, so the plugin never sees it. A {secret:<key>} filled into a query value (net.rs:187) gets no such rewriting, so a service that echoes the URL hands the secret to the plugin. Secrets should be rewritten back to {secret:<key>} the same way.

Where: crates/locallibrary/src/plugin/net.rs. Query values with {secret:<key>} are filled at L258 but never recorded, and named (L311) rewrites only in_query's account tokens. Record each secret filled into the query with its placeholder (raw and URL-encoded) and rewrite it the same way. Start after cutenode/localnetwork#328 (LOC-131) merges, since it changes this file.

Test: like the account test at crates/locallibrary/tests/it/plugins/accounts.rs L713, a server that echoes the URL in a header and the body gives the plugin {secret:<key>}, never the value.

Lingua principale
Rust
Stelle
0
Fork
0
Merge medio
9h 10m
PR unite (30g)
311

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cutenode/localnetwork

Tutte le issue di cutenode/localnetwork

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.