Get SFTP key pair mode working#29098
Merged
Merged
Conversation
Due to removal of '\n' and '\r' from the backendoptions the private keys were affected. And hence resulted in failure to login. So as an alternative in this patch we use base64_encode and base64_decode to convert both the public and private keys. Another advantage is that we don't expose the private keys in the database. Signed-off-by: Sujith H <sharidasan@owncloud.com>
peterprochaska
approved these changes
Sep 29, 2017
Contributor
Author
|
Backport to stable10: #29156 |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Due to removal of '\n' and '\r' from
the backendoptions the private keys were affected.
And hence resulted in failure to login. So as an
alternative in this patch we use base64_encode
and base64_decode to convert both the public and
private keys. Another advantage is that we don't
expose the private keys in the database.
Signed-off-by: Sujith H sharidasan@owncloud.com
Description
SFTP was failing to work with the change made 9b88fa6 . The key problem found was failure to authenticate with the private key.
Related Issue
#28669
Motivation and Context
The issue was caused due to the strip of value in backendoptions. And due to this the private key was modified. Hence authentication failure. This change helps users to convert public key and private key using base64_encode and retrieve the data using base64_decode.
How Has This Been Tested?
Migration test:
With the migration I have noticed the old data remains the same. So if new key is copied to the server using generate keys option in the UI, it works. So both the old keys work as well as the new one generated.
Screenshots (if appropriate):
Types of changes
Checklist: