From 7d9f1ca0b82e2433baac94ec621b25e759d854b2 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Sat, 10 Jan 2015 20:43:14 +0100 Subject: [PATCH] Exlude IPv6 addresses until now --- bin/x509/ip-ssl-subject-api.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/x509/ip-ssl-subject-api.py b/bin/x509/ip-ssl-subject-api.py index 939c44d..a34f546 100644 --- a/bin/x509/ip-ssl-subject-api.py +++ b/bin/x509/ip-ssl-subject-api.py @@ -11,6 +11,7 @@ import redis import sys import netaddr import json +import re import tornado.httpserver import tornado.ioloop @@ -33,6 +34,11 @@ class SSLQueryHandler(tornado.web.RequestHandler): subnets = [input] out = {} for subnet in subnets: + if re.findall(r":", subnet): + self.clear() + self.set_status(400) + self.finish('IPv6 is not (yet) supported') + continue try: iplist = netaddr.IPNetwork(subnet) except: