From b7bb159630f26761ad39d42d75d55c634abcc7a1 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Tue, 10 Dec 2019 10:07:34 -0800 Subject: [PATCH] Fix regex IP match in hostname resolution --- plexpy/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/helpers.py b/plexpy/helpers.py index f5ec2052..4b831439 100644 --- a/plexpy/helpers.py +++ b/plexpy/helpers.py @@ -565,7 +565,7 @@ def get_ip(host): ip_address = '' if is_valid_ip(host): return host - elif not re.fullmatch(r'[0-9]+(?:\.[0-9]+){3}(?!\d*-[a-z0-9]{6})', host): + elif not re.match(r'^[0-9]+(?:\.[0-9]+){3}(?!\d*-[a-z0-9]{6})$', host): try: ip_address = socket.getaddrinfo(host, None)[0][4][0] logger.debug(u"IP Checker :: Resolved %s to %s." % (host, ip_address))