Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rclone): Implement support for empty salts #5

Merged
merged 2 commits into from
Apr 16, 2020

Conversation

alolis
Copy link
Contributor

@alolis alolis commented Apr 15, 2020

If an empty string is used as a salt then it should be replaced with a default one as also done by rclone:
https://github.com/rclone/rclone/blob/b9bd15a8c980c36f15dd9b90bc0c422e4020baec/backend/crypt/cipher.go#L175

The default salt that must be used can be found here:
https://github.com/rclone/rclone/blob/b9bd15a8c980c36f15dd9b90bc0c422e4020baec/backend/crypt/cipher.go#L54

If an empty string is used as a salt then it should be replaced with a default one as also done by rclone:
https://github.com/rclone/rclone/blob/b9bd15a8c980c36f15dd9b90bc0c422e4020baec/backend/crypt/cipher.go#L175

The default salt that must be used can be found here:
https://github.com/rclone/rclone/blob/b9bd15a8c980c36f15dd9b90bc0c422e4020baec/backend/crypt/cipher.go#L54
@codecov-io
Copy link

codecov-io commented Apr 15, 2020

Codecov Report

Merging #5 into master will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #5      +/-   ##
==========================================
+ Coverage   93.58%   93.64%   +0.05%     
==========================================
  Files           9        9              
  Lines         234      236       +2     
==========================================
+ Hits          219      221       +2     
  Misses         15       15              
Impacted Files Coverage Δ
src/constants.js 100.00% <100.00%> (ø)
src/rclone.js 95.00% <100.00%> (+0.26%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb9aab4...bfbf674. Read the comment docs.

@alolis
Copy link
Contributor Author

alolis commented Apr 16, 2020

@FWeinb any chance to have a look at this?

cheers

@FWeinb
Copy link
Owner

FWeinb commented Apr 16, 2020

This look great, thanks for this PR. Would you mind adding a test for this behaviour?

@alolis
Copy link
Contributor Author

alolis commented Apr 16, 2020

Added a test but wasn't sure in which file you wanted it. It should cover the empty salt case. Let me know if you find it sufficient.

@FWeinb FWeinb changed the title Implement support for empty salts feat(rclone): Implement support for empty salts Apr 16, 2020
@FWeinb FWeinb merged commit 370a8e2 into FWeinb:master Apr 16, 2020
@FWeinb
Copy link
Owner

FWeinb commented Apr 16, 2020

Thanks. This looks great!

@FWeinb
Copy link
Owner

FWeinb commented Apr 16, 2020

🎉 This PR is included in version 1.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants