Skip to content

feat(plugin): register vortex-mod-mediafire v1.0.0 (task 34)#147

Merged
mpiton merged 1 commit intomainfrom
feat/task-34-plugin-mediafire
May 4, 2026
Merged

feat(plugin): register vortex-mod-mediafire v1.0.0 (task 34)#147
mpiton merged 1 commit intomainfrom
feat/task-34-plugin-mediafire

Conversation

@mpiton
Copy link
Copy Markdown
Owner

@mpiton mpiton commented May 4, 2026

Summary

What is vortex-mod-mediafire?

Standalone repo: https://github.com/mpiton/vortex-mod-mediafire (GPL-3.0)
Release v1.0.0: https://github.com/mpiton/vortex-mod-mediafire/releases/tag/v1.0.0

WASM hoster plugin (http capability only — no subprocess, no captcha,
no wait). Resolves https://(www.|m.)?mediafire.com/file/<key>(/<filename>)?(/file)?
URLs to direct download<n>.mediafire.com CDN URLs via two strategies:

  • Plain href extraction from the public landing page
  • Base64 data-scrambled-url decoding, with download host allow-list
    to defang attacker-controlled scramble payloads
  • 2 MiB body cap so a malicious server cannot make every regex scan a
    multi-megabyte buffer

Changes

File Change
registry/registry.toml New [[plugin]] block, version 1.0.0, category hoster, SHA-256 of .wasm (5775871b…f942) and plugin.toml (88f1e844…42c0)
CHANGELOG.md Added entry under [Unreleased] / Added describing the plugin's contract, security gates, and test coverage

Why this scope (registry-only)

  • The plugin lives in its own repo, has its own CI, its own release
    cycle. Vortex consumes it via the existing GithubStoreClient
    (src-tauri/src/adapters/driven/plugin/github_store_client.rs)
    which builds the download URL from repository + v<version>.
  • The release asset is named vortex_mod_mediafire.wasm (verified
    against build_wasm_url test fixtures), so the existing installer
    logic resolves it without code changes.
  • No host-side code change is required; the plugin contract
    (can_handle, supports_playlist, extract_links,
    resolve_stream_url) matches the contract already exercised by the
    Vimeo / Gallery / SoundCloud plugins.

Test plan

  • cargo build --target wasm32-wasip1 --release succeeds in the
    plugin repo (1.1 MB artefact)
  • cargo test in the plugin repo: 58 tests pass (4 suites — unit
    lib 43, parser fixtures 12, WASM smoke via Extism 3)
  • cargo clippy --all-targets -- -D warnings: no issues
  • cargo fmt --check: clean
  • SHA-256 of the asset matches registry.toml checksum
    (5775871b…f942)
  • Manual: install through the Vortex plugin browser and resolve a
    real MediaFire link — to do once this PR merges and the registry
    is pulled by the installer
  • CI green on this branch

Related

  • Sprint task: .claude/output/sprints/prd-v2-roadmap/tasks/34-plugin-mediafire.md
  • PRD-v2 §P1.15
  • PRD §4.1 (Hosters gratuits — MediaFire row)

Summary by cubic

Registers the vortex-mod-mediafire v1.0.0 hoster plugin and adds a changelog entry, meeting Task 34 (PRD-v2 §P1.15 / PRD §4.1). The plugin resolves MediaFire file links to direct CDN downloads; no app code changes are needed.

  • New Features
    • Official hoster plugin with http capability only; supports https://(www.|m.)?mediafire.com/file/... (folders out of scope).
    • Resolves via landing-page href or base64 data-scrambled-url, with a download host allow-list and a 2 MiB response cap.
    • Registry entry includes SHA-256 for the .wasm and plugin.toml, official = true, min_vortex_version = "0.1.0".

Written for commit 24e951f. Summary will update on new commits.

Summary by CodeRabbit

  • New Features
    • Added vortex-mod-mediafire plugin v1.0.0 with support for MediaFire URLs, file information extraction, and resumable downloads.

New official MediaFire hoster plugin in sibling repo
`vortex-mod-mediafire/`. Resolves free MediaFire file links to their
direct download<n>.mediafire.com CDN URL via two strategies:

- Plain `href` extraction from the public landing page
- `data-scrambled-url` (base64) decoding, with download host
  allow-list to defang attacker-controlled scramble payloads

Filename + size parsed from `<span class="dl-btn-label" title=...>`
and "Download (X.YZ MB)" label. Resumable=true so the host engine
engages multi-connection ranged downloads.

Coverage: 55 native unit tests + 3 Extism-loaded WASM smoke tests +
9 fixture-driven parser cases. Registry entry includes SHA-256 of
the .wasm and plugin.toml.

PRD-v2 §P1.15, PRD §4.1.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

📝 Walkthrough

Walkthrough

This PR documents and registers a new MediaFire plugin (vortex-mod-mediafire v1.0.0) by adding a changelog entry describing its functionality and a corresponding registry entry with metadata, checksums, and version constraints.

Changes

Plugin Registration and Documentation

Layer / File(s) Summary
Changelog Documentation
CHANGELOG.md
New entry under [Unreleased] → Added documents vortex-mod-mediafire v1.0.0 with supported URL patterns, decoding strategies, filename/size extraction, and resumable reporting.
Registry Entry
registry/registry.toml
Plugin is registered with description, author, category (hoster), repository URL, SHA-256 checksums for WASM and manifest, and minimum Vortex version (0.1.0).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A new plugin hops into the registry today,
Mediafire's secrets it whisks away,
With checksums secure and versions aligned,
In changelog and manifest, perfectly signed! 📦✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and specifically summarizes the main change: registering a new MediaFire hoster plugin (vortex-mod-mediafire v1.0.0) in the plugin registry, which is the primary action reflected in the file changes (CHANGELOG.md and registry/registry.toml).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/task-34-plugin-mediafire

Review rate limit: 4/5 reviews remaining, refill in 12 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 4, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CHANGELOG.md`:
- Line 21: Update the changelog entry that references the registry file: replace
the incorrect path string "vortex/registry/registry.toml" with the correct
repository path "registry/registry.toml" in the CHANGELOG.md entry describing
the plugin registration (the same paragraph that mentions checksum_sha256 and
checksum_sha256_toml for the wasm and manifest).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 20d08e78-6cfc-40db-844e-d3e9deeaf888

📥 Commits

Reviewing files that changed from the base of the PR and between 7ecd9b0 and 24e951f.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • registry/registry.toml

Comment thread CHANGELOG.md

### Added

- **Plugin `vortex-mod-mediafire` v1.0.0** (scope `plugin`, sprint task 34, PRD-v2 §P1.15 / PRD §4.1): new official Vortex plugin in a sibling repo `vortex-mod-mediafire/`. Hoster category, `http` capability only — no wait, no captcha, no subprocess. Recognises `https://(www.|m.)?mediafire.com/file/<key>(/<filename>)?(/file)?` URLs (folder URLs are deliberately out of scope). The plugin scrapes the public landing page, extracting the direct CDN URL via two strategies: the plain `href="https://download<n>.mediafire.com/..."` button and the obfuscated `data-scrambled-url="<base64>"` attribute. Decoded scrambled URLs are checked against a `^download[0-9]*\.mediafire\.com$` host allow-list before being returned, so an attacker controlling the scramble payload cannot redirect the host engine to an arbitrary target. Filename + size are parsed from `<span class="dl-btn-label" title="...">` and the "Download (X.YZ MB)" text; size units span B / KB / MB / GB / TB. `FileLink.resumable` is reported as `true` so the host's segmented engine engages multi-connection ranged downloads. 55 native unit tests + 3 WASM-loaded smoke tests (Extism with stub `http_request`) + 9 fixture-driven parser cases over `tests/fixtures/*.html`. Registered in `vortex/registry/registry.toml` with `checksum_sha256 = 5775871b…f942` (wasm) and `checksum_sha256_toml = 88f1e844…42c0` (manifest).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix the registry path string in the changelog entry.

At Line 21, the entry says vortex/registry/registry.toml, but the file in this repo is registry/registry.toml. Keeping the exact path avoids confusion when contributors verify the registration.

Suggested edit
- ... Registered in `vortex/registry/registry.toml` with `checksum_sha256 = 5775871b…f942` (wasm) and `checksum_sha256_toml = 88f1e844…42c0` (manifest).
+ ... Registered in `registry/registry.toml` with `checksum_sha256 = 5775871b…f942` (wasm) and `checksum_sha256_toml = 88f1e844…42c0` (manifest).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- **Plugin `vortex-mod-mediafire` v1.0.0** (scope `plugin`, sprint task 34, PRD-v2 §P1.15 / PRD §4.1): new official Vortex plugin in a sibling repo `vortex-mod-mediafire/`. Hoster category, `http` capability only — no wait, no captcha, no subprocess. Recognises `https://(www.|m.)?mediafire.com/file/<key>(/<filename>)?(/file)?` URLs (folder URLs are deliberately out of scope). The plugin scrapes the public landing page, extracting the direct CDN URL via two strategies: the plain `href="https://download<n>.mediafire.com/..."` button and the obfuscated `data-scrambled-url="<base64>"` attribute. Decoded scrambled URLs are checked against a `^download[0-9]*\.mediafire\.com$` host allow-list before being returned, so an attacker controlling the scramble payload cannot redirect the host engine to an arbitrary target. Filename + size are parsed from `<span class="dl-btn-label" title="...">` and the "Download (X.YZ MB)" text; size units span B / KB / MB / GB / TB. `FileLink.resumable` is reported as `true` so the host's segmented engine engages multi-connection ranged downloads. 55 native unit tests + 3 WASM-loaded smoke tests (Extism with stub `http_request`) + 9 fixture-driven parser cases over `tests/fixtures/*.html`. Registered in `vortex/registry/registry.toml` with `checksum_sha256 = 5775871b…f942` (wasm) and `checksum_sha256_toml = 88f1e844…42c0` (manifest).
- **Plugin `vortex-mod-mediafire` v1.0.0** (scope `plugin`, sprint task 34, PRD-v2 §P1.15 / PRD §4.1): new official Vortex plugin in a sibling repo `vortex-mod-mediafire/`. Hoster category, `http` capability only — no wait, no captcha, no subprocess. Recognises `https://(www.|m.)?mediafire.com/file/<key>(/<filename>)?(/file)?` URLs (folder URLs are deliberately out of scope). The plugin scrapes the public landing page, extracting the direct CDN URL via two strategies: the plain `href="https://download<n>.mediafire.com/..."` button and the obfuscated `data-scrambled-url="<base64>"` attribute. Decoded scrambled URLs are checked against a `^download[0-9]*\.mediafire\.com$` host allow-list before being returned, so an attacker controlling the scramble payload cannot redirect the host engine to an arbitrary target. Filename + size are parsed from `<span class="dl-btn-label" title="...">` and the "Download (X.YZ MB)" text; size units span B / KB / MB / GB / TB. `FileLink.resumable` is reported as `true` so the host's segmented engine engages multi-connection ranged downloads. 55 native unit tests + 3 WASM-loaded smoke tests (Extism with stub `http_request`) + 9 fixture-driven parser cases over `tests/fixtures/*.html`. Registered in `registry/registry.toml` with `checksum_sha256 = 5775871b…f942` (wasm) and `checksum_sha256_toml = 88f1e844…42c0` (manifest).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` at line 21, Update the changelog entry that references the
registry file: replace the incorrect path string "vortex/registry/registry.toml"
with the correct repository path "registry/registry.toml" in the CHANGELOG.md
entry describing the plugin registration (the same paragraph that mentions
checksum_sha256 and checksum_sha256_toml for the wasm and manifest).

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@codspeed-hq
Copy link
Copy Markdown
Contributor

codspeed-hq Bot commented May 4, 2026

Merging this PR will not alter performance

✅ 26 untouched benchmarks


Comparing feat/task-34-plugin-mediafire (24e951f) with main (7ecd9b0)

Open in CodSpeed

@mpiton mpiton merged commit bcca3b0 into main May 4, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant