Skip to content

fix: reject loader versions that are not versions - #20

Merged
NeyorDEV merged 3 commits into
mainfrom
fix/validate-loader-version
Oct 20, 2026
Merged

NeyorDEV merged 3 commits into
mainfrom
fix/validate-loader-version

Conversation

@NeyorDEV

Copy link
Copy Markdown
Owner

Found during a real run.

Problem

migrate --loader-version <version>, with the placeholder copied as-is from an example, wrote a .mrpack that declared fabric-loader: "<version>". No launcher can install that pack.

Fix

A format check (letters, digits and . + _ -, starting with a letter or digit, 64 characters max) now applies to:

  • --loader-version, before any request and before any file is written;
  • target.loaderVersion in modshift.config.json;
  • the loader version field in the web UI (HTTP 400).

It doesn't claim to check that the version exists, only that it looks like one: 0.16.5, 21.1.77, 47.3.0 and 0.27.1-beta.1 are accepted.

Tests cover the format, the config, and the real case (exit code 1, no request sent, no file written). CHANGELOG updated.

Checks

lint, format, typecheck, build and the docs diff are clean. 437 tests pass.

Note: this PR and #19 both add a "Fixed" line to the CHANGELOG. I'll resolve the small conflict on whichever is merged second.


Generated by Claude Code

A real run with "--loader-version <version>" (a placeholder copied from
an example) wrote a .mrpack declaring fabric-loader "<version>", which no
launcher can install. The option, target.loaderVersion in the config and
the web UI now check the format (letters, digits and . + _ -) before any
request, without claiming to check that the version exists.
@NeyorDEV
NeyorDEV merged commit 7e81171 into main Oct 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant