usnistgov / dane_tester

3 stars 1 forks source link

Type mismatch error in dane_checker.py #2

Open jimfenton opened 7 years ago

jimfenton commented 7 years ago

When testing my domain (that has DNSSEC, but not TLSA records), I get a Python error at line 404 of dane_checker.py:

=> 404 if n.endswith("."): n = n[0:-1]

n = b'mail', n.endswith = TypeError: endswith first arg must be bytes or a tuple of bytes, not str

Since n is an array of bytes, the argument should be b'.' rather than "."

simsong commented 7 years ago

Thanks! I hope to get this fixed shortly.

On Feb 27, 2017, at 12:28 PM, Jim Fenton notifications@github.com wrote:

When testing my domain (that has DNSSEC, but not TLSA records), I get a Python error at line 404 of dane_checker.py:

=> 404 if n.endswith("."): n = n[0:-1]

n = b'mail', n.endswith = TypeError: endswith first arg must be bytes or a tuple of bytes, not str

Since n is an array of bytes, the argument should be b'.' rather than "."

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/usnistgov/dane_tester/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/ABhTrIRRf33cstyYcRyIuMHmSYR857x7ks5rgwfBgaJpZM4MNZTA.

scottr-nist commented 7 years ago

I think the issue may be when using dns.rdtypes.ANY.MX the exchange variable is a Name object, not a string. So any time rr.exchange is called, it should be rr.exchange.to_text(). Looking at it now

simsong commented 7 years ago

I have not been able to get this to get my account reactivated. I'm going to Italy for a week next week. Can you get access to the VM? I can fix the code in the repo.


Sent from my phone.

On Apr 6, 2017, at 1:55 PM, Scott Rose notifications@github.com wrote:

I think the issue may be when using dns.rdtypes.ANY.MX the exchange variable is a Name object, not a string. So any time rr.exchange is called, it should be rr.exchange.to_text(). Looking at it now

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

scottr-nist commented 7 years ago

Simson,

Yes, I have root on the VM, so I can do it.

Scott

On 04/06/2017 08:43 PM, Simson L. Garfinkel wrote:

I have not been able to get this to get my account reactivated. I'm going to Italy for a week next week. Can you get access to the VM? I can fix the code in the repo.


Sent from my phone.

On Apr 6, 2017, at 1:55 PM, Scott Rose notifications@github.com wrote:

I think the issue may be when using dns.rdtypes.ANY.MX the exchange variable is a Name object, not a string. So any time rr.exchange is called, it should be rr.exchange.to_text(). Looking at it now

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/usnistgov/dane_tester/issues/2#issuecomment-292379338, or mute the thread https://github.com/notifications/unsubscribe-auth/AHLOmNFeozaPognHSWnQPlzDuRl7TTYfks5rtYa0gaJpZM4MNZTA.

simsong commented 7 years ago

Okay. I will try to stand up a replicant outside NIST today and debug the system...

Sent from my phone!

On Apr 7, 2017, at 7:59 AM, Scott Rose notifications@github.com wrote:

Simson,

Yes, I have root on the VM, so I can do it.

Scott

On 04/06/2017 08:43 PM, Simson L. Garfinkel wrote:

I have not been able to get this to get my account reactivated. I'm going to Italy for a week next week. Can you get access to the VM? I can fix the code in the repo.


Sent from my phone.

On Apr 6, 2017, at 1:55 PM, Scott Rose notifications@github.com wrote:

I think the issue may be when using dns.rdtypes.ANY.MX the exchange variable is a Name object, not a string. So any time rr.exchange is called, it should be rr.exchange.to_text(). Looking at it now

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/usnistgov/dane_tester/issues/2#issuecomment-292379338, or mute the thread https://github.com/notifications/unsubscribe-auth/AHLOmNFeozaPognHSWnQPlzDuRl7TTYfks5rtYa0gaJpZM4MNZTA.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

simsong commented 7 years ago

Well, I’m trying to get the VM up and running, but I just haven’t had the time. Perhaps I can do it from Rome.

On Apr 7, 2017, at 7:59 AM, Scott Rose notifications@github.com wrote:

Simson,

Yes, I have root on the VM, so I can do it.

Scott

On 04/06/2017 08:43 PM, Simson L. Garfinkel wrote:

I have not been able to get this to get my account reactivated. I'm going to Italy for a week next week. Can you get access to the VM? I can fix the code in the repo.


Sent from my phone.

On Apr 6, 2017, at 1:55 PM, Scott Rose notifications@github.com wrote:

I think the issue may be when using dns.rdtypes.ANY.MX the exchange variable is a Name object, not a string. So any time rr.exchange is called, it should be rr.exchange.to_text(). Looking at it now

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/usnistgov/dane_tester/issues/2#issuecomment-292379338, or mute the thread https://github.com/notifications/unsubscribe-auth/AHLOmNFeozaPognHSWnQPlzDuRl7TTYfks5rtYa0gaJpZM4MNZTA.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/usnistgov/dane_tester/issues/2#issuecomment-292518160, or mute the thread https://github.com/notifications/unsubscribe-auth/ABhTrA37gTJcdPx80h4FuvZ3-LaXOYKDks5rtiUagaJpZM4MNZTA.