You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds AllDebrid Resolver, a community site-resolver plugin that automatically unlocks supported file-host download links (1fichier, Rapidgator, etc.) via the official AllDebrid API and feeds high-speed direct links to Aria2.
I found a few issues that should be addressed before adding this plugin to the registry.
Fail closed when the supported-host list is unavailable.isSupportedHost() returns true when the domain set is missing or empty. If the /hosts request fails or returns an empty list, an unrelated download URL may be sent to /link/unlock, including a private or signed URL.
Return false when no validated host list is available, leave the download unchanged, and retain a previously validated cache if a refresh fails. Add tests for timeouts, non-200 responses, invalid JSON, empty lists, and failed refreshes. Verify that unsupported URLs are never sent to /link/unlock.
Keep credentials and full URLs out of diagnostics. Authenticated requests currently put the API key in the query string. Consider using the Authorization: Bearer header documented by AllDebrid. The plugin also passes complete original and resolved URLs to the logger, which may contain access tokens.
Log only the information needed for diagnosis, such as the hostname and error code, and sanitize exception messages. Add tests using token-bearing URLs and request errors, and verify that secrets do not appear in logs or notifications.
Match exclusions against the parsed hostname.shouldSkip() searches the entire URL for strings such as localhost and alldebrid.com. A URL may therefore be skipped because one of those strings appears in its path or query.
Parse HTTP(S) URLs using a parser available in the plugin runtime, and compare hostnames using exact or dot-boundary suffix matching. Add tests for matching strings in paths and queries, lookalike domains, credentials, ports, and IPv6.
After the fixes, please publish a new plugin version and update the package URL, SHA-256, and size in this PR.
Thank you for the detailed and constructive code review!
I have implemented all the requested changes in release v1.2.0:
Fail-closed host validation & cache resilience:
isSupportedHost() strictly fails closed (returns false) if no validated host list is available or empty, ensuring unsupported URLs are never sent to /link/unlock and leaving downloads unchanged.
The plugin retains the previously validated cache when a background refresh fails (network error, timeout, or non-200).
Added automated tests for network timeouts, non-200 responses, invalid JSON, empty lists, and verifying downloads are left untouched for unsupported links.
Bearer authentication & sanitized diagnostics:
Authenticated requests to the AllDebrid API now use the standard Authorization: Bearer <apiKey> header instead of putting the key in the query string.
Diagnostic logs now only log sanitized hostnames and error codes; full URLs and query tokens are completely excluded from logs and notifications.
Strict hostname parsing (shouldSkip):
Replaced substring .includes() matching with strict authority extraction and hostname comparison.
Hostname comparisons use exact and dot-boundary suffix matching. It handles IPv6 bracketed hosts, port stripping, and user credentials in URLs.
Added unit test coverage for path/query false positives, credentials, ports, IPv6, and lookalike domains.
Release & Registry manifest:
Packaged and published release v1.2.0.
Updated the package URL, SHA-256, and size in this PR.
All 15 automated unit test suites pass cleanly. Ready for your review!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds AllDebrid Resolver, a community
site-resolverplugin that automatically unlocks supported file-host download links (1fichier, Rapidgator, etc.) via the official AllDebrid API and feeds high-speed direct links to Aria2.community.alldebrid-resolver-1.2.0.moext(6850 bytes)14ef0fe353c8d8e18cfff12a46bcc659c9efa9ef2a109a3f6687db1fb1c14a4ahttp: Communicates withhttps://api.alldebrid.com/v4to verify account status and unlock links.notify: Displays desktop notifications on link unlock and account status.storage: Persists plugin configuration locally.hostPermissions: ["*://*/*"]: Required by Motrix to intercept input download URLs inbeforeCreatehook.