TritonDataCenter / python-manta

Python SDK for Manta (community maintained)
MIT License
25 stars 18 forks source link

Fix ssh pub key parsing to remove comment portion #14

Closed tomahn closed 8 years ago

tomahn commented 11 years ago

When using the PrivateKeySigner for auth, fingerprint_from_ssh_pub_key() doesn't completely parse the SSH pub key correctly (it's leaving the comment if there is one). This results in a bad fingerprint and subsequent error.

tomahn commented 11 years ago

Also, a missing trailing slash in mkdir() results in the last directory not being created. The docstring says "A manta path, e.g. '/trent/stor/mydir'.", so this is misleading. A simple fix is to just append a slash if needed.

trentm commented 10 years ago

An example traceback resulting from the fingerprint_from_ssh_pub_key not stripping the comment: https://gist.github.com/duderstadt/07555d4eadc2f8ab732e

I'm sorry I haven't picked up this PR for months. I haven't seen the traceback myself (it doesn't break on my keys with comments). If @tomahn or @duderstadt would be able to post a pubkey on which this breaks, that'd be appreciated.

@tomahn Regarding the second commit to MantaClient.mkdir(). I can't reproduce this failing when the arg to mkdir has no trailing '/'. For now I'm commiting the first part of this PR.

tgross commented 8 years ago

Hey @trentm do we want to close this PR? The commit looks to have been rebased into master in https://github.com/joyent/python-manta/commit/648ad0d3ec0338da1fce043898617b89ccb44d2f and so it's been released to the wild for a while now.

trentm commented 8 years ago

@tgross The ssh pub key parsing part of this PR is in. The mkdir trailing slash thing isn't.

trentm commented 8 years ago

Ah, I already commented on not being able to repro the mkdir issue. I still can't. Closing this as fixed.