fog / fog

The Ruby cloud services library.

Home Page:http://fog.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Route53 wildcard escaping

bgentry opened this issue · comments

So, it turns out that the Route53 API accepts the * character in requests involving wildcard domains. However, when you retrieve these records using ListResourceRecordSets, the * is actually returned as \052 (the ASCII hex code). Example:

<ListResourceRecordSetsResponse xmlns="https://route53.amazonaws.com/doc/2012-02-29/">
   <ResourceRecordSets>
      <ResourceRecordSet>
         <Name>\052.mydomain.com.</Name>
...

In my mind, this feels like something Fog should make me not have to care about. However, there are likely people already depending on this weird behavior in their usage of Fog (myself included), and I couldn't find it properly documented anywhere in AWS docs. Did find a few other references to the problem via Googling (like pcorliss/ruby_route_53#7).

Should the Fog parsers handle this for the user and return this escaped character as an actual *, or should it stay as is?

@bgentry - ug. My inclination is to say that it should return an actual * as this seems least confusing/incoherent. But it could break backwards compatibility. We should probably just change it as the current behavior seems broken. What were your thoughts?

@geemus I'd say take care of it in Fog. If people are handling it with a gsub it shouldn't matter anyway:

r.name.gsub('\\052', '*')

I'll work on a change.

@bgentry - very true, sounds good, I'll keep an eye out for the patch.