[
https://issues.apache.org/jira/browse/CLOUDSTACK-8649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14637107#comment-14637107
]
ASF GitHub Bot commented on CLOUDSTACK-8649:
--------------------------------------------
Github user wilderrodrigues commented on the pull request:
https://github.com/apache/cloudstack/pull/615#issuecomment-123766531
Hi guys,
1. RegisterSSHKeyPairCmd.getPublicKey() doesn't do a decoding of the key.
That's just a simple getter method.
2. However, I don't think the addition of the URLDecoder for the public key
is really necessary.
I have seen the use of URLDecoder for the cypher text, an URL or form data,
but not the pub-key itself being decoded using W3C.
""" Decodes a application/x-www-form-urlencoded string using a specific
encoding scheme. The supplied encoding is used to determine what characters are
represented by any consecutive sequences of the form "%xy".
Note: The World Wide Web Consortium Recommendation states that UTF-8 should
be used. Not doing so may introduce incompatibilities."""
@DaanHoogland, is it being done because the data is coming via the API,
which is a web based? If so, it does make sense.
@borisroman: in order to make Java compatible with the RFC-3986, we need to
do something like:
* To comply with RFC-3986.
* URLEncoder.encode(original, "UTF-8").replace("+", "%20").replace("*",
"%2A").replace("%7E", "~");
Perhaps finding where the pub-key gets decoded before the the code Daan
added is better than just removing it.
In addition, could you let me know which steps you followed to test it? I
would like to help verifying.
Cheers,
Wilder
> Register SSH keypair is broken
> ------------------------------
>
> Key: CLOUDSTACK-8649
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8649
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Affects Versions: 4.5.0, 4.5.1
> Reporter: Lennert den Teuling
>
> It seems that when we upgraded form CS 4.3 to 4.5 the register SSH keypair
> functionality broke.
> Registering keypairs work, but deployments with these newly registered
> keypair fails because they are not correctly put into the database.
> It seems that at least half of the public key data is missing in the
> database. We have tried this with multiple keys, even with keys that worked
> before. Keys that were registered before the upgrade still work.
> It is simple to reproduce, just register a SSH key and you will see the key
> will to be correctly put into the "ssh_keypairs" table and encrypting the VM
> password with the key will fail on deployment.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)