sopel-irc / sopel

:robot::speech_balloon: An easy-to-use and highly extensible IRC Bot framework. Formerly Willie.
https://sopel.chat
Other
950 stars 405 forks source link

safety, url: skip handling invalid links with empty hostnames #2472

Closed SnoopJ closed 1 year ago

SnoopJ commented 1 year ago

Description

This PR fixes an edge-case in url and safety when the result of urlparse has a hostname of None

19:20 <+dgw> https://?bonk
19:20 <+Sopel> Unexpected AttributeError ('NoneType' object has no attribute 'lower') from dgw at 2023-06-13 23:20:54.685361+00:00. Message was: https://?bonk
19:20 <+Sopel> Unexpected AttributeError ('NoneType' object has no attribute 'lower') from dgw at 2023-06-13 23:20:54.705164+00:00. Message was: https://?bonk

Checklist