fix: prevent nil panic for unsafe HEAD requests#2455
fix: prevent nil panic for unsafe HEAD requests#2455Mzack9999 merged 2 commits intoprojectdiscovery:devfrom
Conversation
Neo - PR Security ReviewNo security issues found Highlights
Comment |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughRefactors error-handling in the unsafe HEAD request path by replacing a switch guard with an explicit Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description:
httpxwith--unsafeand sending aHEADrequest,Do()could panic due to dereferencingerrwhen it wasnil(err.Error()was called even on success).err.Error()call by requiringerr != nilbefore accessing it.Fixes #2458
Summary by CodeRabbit