Invalid custom filter regex becomes HTTP 500 instead of a query error

Aperta
#192 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@TimeToBuildBob ci sta già lavorando.

Dal 28/10/2026.

  • #193 di @TimeToBuildBob — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
20/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
flask, python
Ambito
api, backend

Direzione di ricerca

Start at the query-function boundary for filter_keyvals_regex and trace how regex compilation errors become query errors; the issue names the offline Flask query route as the integration point. Check existing QueryFunctionException and QueryExecutionError handling, then review regression coverage for empty and populated input, valid matching and nonmatching patterns, and the HTTP route. Done means malformed patterns return HTTP 400 with a useful diagnostic while valid matching and the stated TypeError behavior remain intact.

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

Descrizione

Reproduced on current master c7821899ab38c1a39c87d7bf011c22a78de9b205 with the real offline Flask query route (aw-server 994ea988, MemoryStorage, query cache disabled): RETURN = filter_keyvals_regex([], "title", "["); returns HTTP 500 with an uncaught regex compilation error. A valid regex returns HTTP 200.

Expected: malformed custom AQL filter patterns raise the existing QueryFunctionException/QueryExecutionError hierarchy and return HTTP 400 with a useful diagnostic. This is separate from category-rule invalid-regex handling fixed in ActivityWatch/aw-core#176.

Scope: translate regex compilation errors at the query-function boundary only; preserve the low-level transform contract, valid matching, and event-data TypeError behavior. Regression coverage should include empty/populated input, valid matching/nonmatching patterns, and the actual offline HTTP route. I am preparing the scoped repair.

Lingua principale
Python
Stelle
65
Fork
74
Merge medio
2g 8h
PR unite (30g)
6

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 ActivityWatch/aw-core

Tutte le issue di ActivityWatch/aw-core

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.