Fix bundled aMule EC password synchronization#27
Open
floze-the-genius wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes aMule ExternalConnect (EC) authentication mismatches by ensuring the bundled amuled and the backend derive credentials from the same AMULE_PASSWORD plaintext, and by updating persisted amule.conf files on startup so password rotations don’t leave EC client/daemon out of sync.
Changes:
- Derive
ECPassword(MD5 hash) fromAMULE_PASSWORDinentrypoint.sh(defaulting tosecret) and write it into generated configs. - On startup, synchronize
ECPasswordin an existing persistedamule.confto match the currentAMULE_PASSWORD. - Add a shell regression test covering default, custom, and rotated password scenarios; align devcontainer + Compose documentation with runtime behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tests/entrypoint-config.test.sh |
Adds regression coverage for default/custom/rotated EC password hashing and persistence behavior. |
entrypoint.sh |
Computes EC password hash from AMULE_PASSWORD and synchronizes persisted amule.conf on startup. |
docker-compose.example.yml |
Updates documentation comments to reflect that AMULE_PASSWORD configures both bundled aMule and Mularr. |
.devcontainer/setup-amule.sh |
Uses the same AMULE_PASSWORD-derived EC password hash when generating dev configs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
ECPasswordhash from the sameAMULE_PASSWORDplaintext used by the backendamule.conffiles on startup so password rotations do not leave the daemon and EC client out of syncVerification
tests/entrypoint-config.test.shsh -n entrypoint.shbash -n .devcontainer/setup-amule.shdocker build -t mularr-batch70-typescript-02:fixed .AMULE_PASSWORD=custom-secret:/api/media/transferssucceeded and generatedECPassword=ddc33abcbec51fd4de296be5cf1230fecustom-secret:/api/media/transferssucceeded with no EC authentication errorsOn current
main(v0.16.2), the defaultsecretpath already authenticates successfully. The remaining reproducible failure was settingAMULE_PASSWORD, which changed the backend credential while generated and persisted bundled configs retained the hardcoded hash forsecret.Fixes #20