BIND 10 #2534: support minor cases for quoted character strings
BIND 10 Development
do-not-reply at isc.org
Wed Jan 29 12:04:43 UTC 2014
#2534: support minor cases for quoted character strings
-------------------------------------+-------------------------------------
Reporter: jinmei | Owner: muks
Type: task | Status:
Priority: medium | reviewing
Component: libdns++ | Milestone:
Keywords: | bind10-1.2-release-freeze
Sensitive: 0 | Resolution:
Sub-Project: DNS | CVSS Scoring:
Estimated Difficulty: 4 | Defect Severity: N/A
Total Hours: 0 | Feature Depending on Ticket:
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Changes (by kean):
* owner: kean => muks
Comment:
Alright then I am asserting that the test case is incorrect, based on my
reading of RFC1035. That RFC states (on page 35):
<character-string> is expressed in one or two ways: as a contiguous set
of characters without interior spaces, or as a string beginning with a
"
and ending with a ". Inside a " delimited string any character can
occur, except for a " itself, which must be quoted using \ (back
slash).
Because these files are text files several special encodings are
necessary to allow arbitrary data to be loaded. In particular:
@ A free standing @ is used to denote the current origin.
\X where X is any character other than a digit (0-9), is
used to quote that character so that its special
meaning
does not apply. For example, "\." can be used to place
a dot character in a label.
By those rules, using the latter "A" below instead of the longer string
"Test-String" for easier typing, the input string (as a sequence of
bytes):
{{{
A " A "
0x41 0x22 0x41 0x22
}}}
Since the string does not start with a quote, it is not a QSTRING, just a
normal string. That is, it is the string 'A"A"', where ' is used here
solely as a delimiter. When producing the text version of that string, I
would expect the returned result to be:
{{{
" A \ " A \ "
0x22 0x41 0x5c 0x22 0x41 0x5c 0x22
}}}
Or, when adding in the quotes for a C++ string, I would expect the result
to be:
{{{
"\"A\\\"A\\\""
}}}
Which is exactly how the test was before your change. Therefore, since you
didn't answer it the first time around I must ask again, did you change
the test case to make it pass or did you cognitively compute the desired
outcome to have that space there?
--
Ticket URL: <http://bind10.isc.org/ticket/2534#comment:13>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list