Skip to content

Plugin lua http module has no timeout — one plugin's network call can freeze vfox activate/vfox env (and the user's shell) indefinitely #693

Description

@xooooooooox

internal/plugin/luai/module/http/http.go (createModule) builds the client as &http.Client{} — no Timeout — in both the proxy and non-proxy paths. Go's default is no timeout at all.

Since vfox activate output is eval'd synchronously in the shell rc and _vfox_hook runs before every prompt, a single plugin http.get against an endpoint that accepts the connection but never responds freezes the user's terminal indefinitely — no error, no prompt.

Real-world case: vfox-ruby fetches its release manifest at plugin-load time; with a local proxy that was black-holing connections, vfox activate blocked for 60+ seconds until killed manually. New terminals appeared to hang at startup.

Suggestion: set a default Client.Timeout (e.g. 30s), optionally configurable via config.yaml (http.timeout). This turns an unbounded freeze into a bounded, reportable failure — vfox already degrades gracefully when a plugin errors.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions