Skip to content

Why do we escape "+" characters in the authorization token? #11

@dsboulder

Description

@dsboulder

My company uses vCD server 5.5.3 (with non-ldap local auth) and we're attempting to use this library against it. The server sometimes returns base64 encoded tokens with "+" characters in it, and the library URI encodes them to %2B. But the vCD server rejects those tokens as invalid. If I remove the gsub call the ruby gem works perfectly. I was wondering how this works with vCloudAir and I discovered those tokens are pure hex and never contain a "+". Can someone safely remove the .gsub() call in connection.rb so that this library works with vCD 5.5.3 as configured by us?

Here's the code snippet that's questionable (line 40):

        unless @cookies["vcloud-token"].gsub!("+", "%2B").nil?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions