Fix #818: Decode unexpected octal asterisk in domain name #1216

Open
wants to merge 1 commit into
from

Projects

None yet

2 participants

@meonkeys
meonkeys commented Jan 2, 2013

The Route 53 API returns asterisks as their escaped octal equivalent.
I wasn't sure why, so I asked for help at
https://forums.aws.amazon.com/thread.jspa?threadID=113183 .

This workaround is the approach taken in
fog/fog#1093 and
pcorliss/ruby_route_53#7 .

@meonkeys meonkeys Decode unexpected octal asterisk in domain name
The Route 53 API returns asterisks as their escaped octal equivalent.
I don't know why, but I asked for help at
https://forums.aws.amazon.com/thread.jspa?threadID=113183 .

This workaround is the approach taken in
fog/fog#1093 and
pcorliss/ruby_route_53#7 .
502d04b
@jamesls
Member
jamesls commented Jan 7, 2013

Thanks for the pull request. It looks like the forum post was updated with more information:

The name of the domain. If the name includes characters other than a to z, 0 to 9, - (hyphen), or _ (underscore),
ListResourceRecordSets returns the characters as escape codes in the format \three-digit octal code. This is true
whether you specified the characters as characters or as escape codes when you created the resource record set.

So we should probably update this PR to account for the newly updated docs.

@meonkeys
meonkeys commented Jan 8, 2013

Yes, I saw that Scott Kralik updated the docs. Cool! I marked his as the "accepted answer", but didn't otherwise reply.

I'll look into this. I'm thinking we want to convert (decode) octal escapes to characters for any characters that can be passed into the API unescaped. @jamesls, do you agree?

From the doc, it looks like we want low ASCII 0x21 through 0x2D and 0x2F through 0x7E unescaped. Instead of

self.name = value.replace(r'\052', '*')

I'm thinking something more like this. What do you think?

@jamesls, I'd love to get together with you briefly to pair on this. That would be the quickest way to learn conventions in this codebase, how to get unit tests working, where to put the octalReplace() helper method, etc. If you're up for that, let me know.

@meonkeys
meonkeys commented Feb 8, 2013

nudge

@cd34 cd34 referenced this pull request in gtaylor/python-route53 Sep 2, 2013
Closed

When you use a wildcard DNS hostname, i.e. *.domain.com, the return #5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment