You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by borisroman <gi...@git.apache.org> on 2015/08/17 22:59:15 UTC

[GitHub] cloudstack pull request: Removed double encoding of Public Key fro...

GitHub user borisroman opened a pull request:

    https://github.com/apache/cloudstack/pull/709

    Removed double encoding of Public Key from JS.

    See Cloudstack issue CLOUDSTACK-8742 & CLOUDSTACK-8649 for information.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/borisroman/cloudstack CLOUDSTACK-8742

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/709.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #709
    
----
commit f9e21da5dda095f23b6809946e4a2b8ab7c8f86b
Author: Boris Schrijver <bo...@pcextreme.nl>
Date:   2015-08-17T20:56:17Z

    Removed double encoding of Public Key from JS.
    
    See Cloudstack issue CLOUDSTACK-8742 for information.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Removed double encoding of Public Key fro...

Posted by borisroman <gi...@git.apache.org>.
Github user borisroman commented on the pull request:

    https://github.com/apache/cloudstack/pull/709#issuecomment-132140803
  
    @karuturi You should send a public key which has it's special characters ( SPACE / - % ) replaced with uri compatible escape characters. -> encoding http://www.w3schools.com/tags/ref_urlencode.asp


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Removed double encoding of Public Key fro...

Posted by milamberspace <gi...@git.apache.org>.
Github user milamberspace commented on the pull request:

    https://github.com/apache/cloudstack/pull/709#issuecomment-132097225
  
    
    LGTM +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Removed double encoding of Public Key fro...

Posted by ustcweizhou <gi...@git.apache.org>.
Github user ustcweizhou commented on the pull request:

    https://github.com/apache/cloudstack/pull/709#issuecomment-132123648
  
    @karuturi  go to the Accounts page, and select "SSH Key pairs" in the dropdown.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Removed double encoding of Public Key fro...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the pull request:

    https://github.com/apache/cloudstack/pull/709#issuecomment-132072846
  
    so, the double encoding and double decoding lived happily together :) 
    Now, jquery does the encoding from UI and decoding is done in ApiServlet.processRequestInContext() method
    When we make an api call directly(though cloudmonkey etc.), we should pass the encoded value (which is same as earlier and no apidoc change is required)
    is my understanding right?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Removed double encoding of Public Key fro...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the pull request:

    https://github.com/apache/cloudstack/pull/709#issuecomment-132121577
  
    @milamberspace, I couldnt find registerSSHKeyPair from UI. I could only see reset ssh key on a stopped vm. Where is this option in UI?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Removed double encoding of Public Key fro...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/709#issuecomment-132072731
  
    @borisroman does backend do double decoding? there was a patch for cloudmonkey regarding this: https://github.com/apache/cloudstack-cloudmonkey/commit/6bd92395592c133a63b8087bf4acc9cb3a1aac0d so does this need to be fixed in cloudmonkey as well?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Removed double encoding of Public Key fro...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cloudstack/pull/709


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Removed double encoding of Public Key fro...

Posted by wido <gi...@git.apache.org>.
Github user wido commented on the pull request:

    https://github.com/apache/cloudstack/pull/709#issuecomment-132145283
  
    LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Removed double encoding of Public Key fro...

Posted by borisroman <gi...@git.apache.org>.
Github user borisroman commented on the pull request:

    https://github.com/apache/cloudstack/pull/709#issuecomment-131968267
  
    It was double encoded because encodeURIComponent() and jQuery.param() encoded it. The latter does this automatically because the request is of type post and the option processData was not explicitly set to false.
    
    http://api.jquery.com/jquery.ajax/#sending-data-to-server


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Removed double encoding of Public Key fro...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the pull request:

    https://github.com/apache/cloudstack/pull/709#issuecomment-132121319
  
    @borisroman excluding the cloudmonkey bit, if I make direct api call, should I send the encoded value or the original value. Did that change from previous version? 
    I think it would be better to also update api documentation to reflect whether it accepts encoded/decoded value. right now it just says "Public key material of the keypair"
    https://cloudstack.apache.org/api/apidocs-4.5/user/registerSSHKeyPair.html


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Removed double encoding of Public Key fro...

Posted by borisroman <gi...@git.apache.org>.
Github user borisroman commented on the pull request:

    https://github.com/apache/cloudstack/pull/709#issuecomment-132106862
  
    @karuturi Cloudmonkey passes an single encoded public key, as it's supposed to!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Removed double encoding of Public Key fro...

Posted by ustcweizhou <gi...@git.apache.org>.
Github user ustcweizhou commented on the pull request:

    https://github.com/apache/cloudstack/pull/709#issuecomment-132102845
  
    LGTM.
    
    I made the commit two years ago. However, something changed in the following commit, so the encoding on UI is not needed any more.
    
        commit 6aafb9c50da3cf4db37c0323d8bdc859776a8fa0
        Author: Likitha Shetty <li...@citrix.com>
        Date:   Thu Nov 21 13:33:57 2013 +0530
    
            CLOUDSTACK-5227. Cannot pass Japanese characters as parameter values to an API.
            During API check for control characters use pattern matching to avoid identifying all non-printable characters as control characters.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---