Plugins fail to load when the HOME path contains ';' or '?' (Lua package.path)
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with LimitPackagePath in internal/plugin/luai/vm.go (lines 62 to 66), which joins the plugin search templates with ';', then the template construction in internal/plugin/lua_plugin.go around lines 258 and 266 where the plugin directory under HOME is built. Reproduce by setting HOME to a path containing ';' or '?' and running vfox add with the vfox-zig v0.1.3 archive. Done when plugins load from such HOME paths or vfox rejects them with a message naming the character. Note that PR #822 is already open against this issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Plugins cannot be added or used when the HOME path contains ; or ?.
internal/plugin/luai/vm.go sets the Lua package.path in LimitPackagePath (lines 62 to 66 at v1.1.0 and on main) by joining the plugin's search templates with ;. The templates are built from the plugin directory, which lies under the HOME path (internal/plugin/lua_plugin.go lines 258 and 266). Lua reads ; as the separator between templates and ? as the placeholder for the module name. So a directory name that contains either character is split, or has the module name spliced into it.
Reproduction, with vfox 1.1.0 on Linux x86-64 and the vfox-zig v0.1.3 zip archive. Each HOME has a .vfox/plugin directory below it:
HOME="<dir>;home" vfox add --source vfox-zig-v0.1.3.zip
HOME="<dir>?home" vfox add --source vfox-zig-v0.1.3.zip
HOME="<dir>/plain" vfox add --source vfox-zig-v0.1.3.zip # control
Actual, with ;: validate wrapper failed: failed to load [Available] hook function: ... module util not found ... stat <dir>/semi: no such file or directory ..., exit 1. With ?: the ? is replaced by the module name in the path, and vfox reports failed to load [Detect] hook function: ... module detect_zig not found, exit 1. The control adds the plugin, exit 0.
Expected: a plugin loads from any HOME path. Alternatively, vfox refuses such a HOME before it adds or runs a plugin, with a message that names the character.
The same code is in v1.1.0 (tag b2478de) and on main (90a96e1).
- Lingua principale
- Go
- Stelle
- 4k
- Fork
- 177
- Merge medio
- 1g 20h
- PR unite (30g)
- 31
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la 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 version-fox/vfox
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
version-fox/vfox#825 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
version-fox/vfox#823 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 45/100
version-fox/vfox#824 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: the Available cache ignores the environment, so one setting's list is shown for anotherForse già presa @nanami7777777 l’ha presa oggi. Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
version-fox/vfox#816 ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature]: treat two names of one install as the same versionForse già presa @Detoy l’ha presa oggi. Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
version-fox/vfox#814 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di version-fox/vfox
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
seaweedfs/seaweed-block#443 ·
I maintainer di solito rispondono entro 1 giorno
-
HTTP `batch.Send` returns nil and inserts no rows when the block does not encodeForse già presa @Indian-boult l’ha presa oggi. Apertabug queries
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ClickHouse/clickhouse-go#2155 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
transparency-dev/tessera#1286 ·
I maintainer di solito rispondono entro 1 giorno