-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix NPE in SimpleResolver #277
Conversation
Codecov ReportBase: 64.18% // Head: 64.17% // Decreases project coverage by
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## master #277 +/- ##
============================================
- Coverage 64.18% 64.17% -0.02%
- Complexity 2766 2770 +4
============================================
Files 178 178
Lines 12536 12540 +4
Branches 1911 1912 +1
============================================
+ Hits 8046 8047 +1
- Misses 4001 4003 +2
- Partials 489 490 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Hi, thanks for your contribution! I'm very hesitant to accept this as is, as I'm currently considering the answer you received from the server is invalid. Specifically, the DNS specification requires the validation on all of id/name/class/type (see RFC 5452, 9.1). However, you're right that the missing name shouldn't cause a NPE: the response from Can you please share some details about the setup where you got this, especially the name and version of the server? |
When reading a response that is REFUSED with no more data. The code could crash while comparing the DNS query with the response. This change skips the comparison if the response is denied.
The DNS server is something I'm accessing as a third party so I have no info about the server itself. I have notified them and hope that they fix stuff on their side. However, I changed the fix to throw an WireParseException instead. Only issue I have with this solution is that the DENIED flag might be a good indicator on what is wrong and that is hidden right now. Maybe returning the message with the exception is a solution? |
@ibauersachs have you had time to think about this? :) |
No, not yet. I'll might get to it on Sunday, but I can't make any promises. |
It's fine like this, thank you! |
When reading a response that is REFUSED with no more data. The code could crash while comparing the DNS query with the response.
This change skips the comparison if the response is denied.