Non-UTF-8 paths send empty heartbeats on Neovim; g:aw_hostname is not URL-encoded
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- vim
- Ambito
- tooling
Direzione di ricerca
Parti da HTTPPostJson e dal codice che costruisce s:bucket_apiurl; sono gli unici due punti toccati dalla correzione. Riproduci in Neovim 0.9.5 con un percorso come caf\xe9.txt e con let g:aw_hostname impostato a 'my laptop', 'host#1' e 'a/b'. Fatto quando un json_encode che fallisce non invia più un body vuoto e il bucket id è percent-encoded, così che il bucket creato sul server corrisponda a ciò che riporta :AWStatus.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Two smaller request-building bugs found while testing ActivityWatch/aw-watcher-vim#32. Both reproduced on master 4ba86d0 with Neovim 0.9.5.
1. A non-UTF-8 file path or cwd sends empty heartbeats (Neovim only). On Neovim, json_encode fails with E474 ... does not start any UTF-8 character on a path such as caf\xe9.txt. HTTPPostJson has no abort, so curl posts an empty body, and every heartbeat produces an E474 plus a status code 400 error. A non-UTF-8 working directory affects every buffer. Vim does not hit this: its json_encode substitutes U+FFFD, so the heartbeat succeeds with a mangled path.
Fix idea: skip the send when json_encode fails (try/catch), or encode the path lossily first.
2. g:aw_hostname is pasted into URLs without percent-encoding. Each value fails differently:
my laptop: curl rejects the URL (exit 3), which is reported as "Failed to connect".host#1: curl drops everything after#, so it createsaw-watcher-vim_hostwhile:AWStatussays running, then every heartbeat gets a 422.a/b: the request gets a 404.
This only matters when the user overrides the hostname, since the default from hostname() is URL-safe.
Fix idea: percent-encode the bucket id when building s:bucket_apiurl.
- Lingua principale
- Vim Script
- Stelle
- 124
- Fork
- 15
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
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
- 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 ActivityWatch/aw-watcher-vim
-
That watcher is still valid?Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
ActivityWatch/aw-watcher-vim#31 · 2 commenti · 3 reazioni ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
ActivityWatch/aw-watcher-vim#22 · 3 commenti · 1 reazione ·
-
Issue with neovim+alacrittyAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
ActivityWatch/aw-watcher-vim#20 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
ActivityWatch/aw-watcher-vim#15 · 2 commenti ·
Tutte le issue di ActivityWatch/aw-watcher-vim
Issue simili
-
[Bug] check:changed and deslop report a missing oxlint report on Windows instead of running oxlintApertabug platform:windows root-cause:found
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
openchamber/openchamber#7619 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
area: discovery good first issue type: feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
NatLabRockies/openstudio-mcp#286 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Windows Ghidra provider rejects a PATH-only JDK: bare `java.exe` probe fails with Win32 87Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
JuliaLang/AllocCheck.jl#124 ·