Opened 7 years ago

Closed 7 years ago

#2188 closed defect (fixed)

b10-loadzone tries to remove comments from RData strings

Reported by: vorner Owned by: vorner
Priority: medium Milestone: Sprint-20120904
Component: loadzone Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 4 Add Hours to Ticket: 0
Total Hours: 2.24 Internal?: no

Description

If there's a semicolon in the text of, say, TXT record, b10-loadzone interprets it as a comment (even inside the double quotes). So this, for example, won't work:

mail._domainkey.vorner.cz.      3600    IN      TXT     "v=DKIM1; g=*; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDRrmcdQxhynm6Jlgg4MrsAxBICXVTUcsSj49XxMI5x+/3swzqsNjwy9+fOpDNx3LVbkBX4STRV1fsvXR1yi70ZxjOAkXu2bv1PuKP0eiK5xborxIu5nrr3P1dJzhs3j+pnutrTmHkv66Gia4/gIUzMh9j0Tfv2ReXheBoWogSLjQIDAQAB"

As only this will get through the preprocessing:

mail._domainkey.vorner.cz.      3600    IN      TXT     "v=DKIM1;

Subtickets

Change History (7)

comment:1 Changed 7 years ago by jinmei

This is not good, but I'd rather like to solve it in a generic parser framework.

comment:2 Changed 7 years ago by jelte

  • Milestone changed from New Tasks to Sprint-20120904

comment:3 Changed 7 years ago by vorner

  • Owner set to vorner
  • Status changed from new to accepted

comment:4 Changed 7 years ago by vorner

  • Owner changed from vorner to UnAssigned
  • Status changed from accepted to reviewing

Hello

It should be ready for review.

I propose this changelog:

[bug]		vorner
Fixed a problem when b10-loadzone tried to tread semicolon in string data
as start of comment, which caused invalid data being loaded.

comment:5 Changed 7 years ago by jelte

  • Owner changed from UnAssigned to jelte

comment:6 Changed 7 years ago by jelte

  • Owner changed from jelte to vorner

technically, I think escaped doublequotes should be allowed, but IMO this is good enough for now.

One unrelated comment in pre-existing code; the global there in master.py:56 is unnecessary and can be removed.

Please go ahead and merge

comment:7 Changed 7 years ago by vorner

  • Resolution set to fixed
  • Status changed from reviewing to closed
  • Total Hours changed from 0 to 2.24

Thank you, closing.

I didn't remove the global, because the code looks low-quality as a whole and we want to replace it anyway.

Note: See TracTickets for help on using tickets.