Plugins fail to load when the HOME path contains ';' or '?' (Lua package.path)

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

I maintainer di solito rispondono entro 1 giorno

@Xnadir ci sta già lavorando.

Dal 22/11/2026.

  • #822 di @Xnadir — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
go, lua
Ambito
cli

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

bug

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

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 version-fox/vfox

Tutte le issue di version-fox/vfox

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.