Skip to content
This repository has been archived by the owner on Oct 5, 2019. It is now read-only.

Find Domains filter fails with "ValueError: Invalid IPv6 URL" #15

Closed
jjsendor opened this issue Mar 31, 2016 · 2 comments
Closed

Find Domains filter fails with "ValueError: Invalid IPv6 URL" #15

jjsendor opened this issue Mar 31, 2016 · 2 comments
Assignees

Comments

@jjsendor
Copy link
Contributor

find_domains.py crashes with ValueError: Invalid IPv6 URL:

File "osxcollector/output_filters/base_filters/output_filter.py", line 140, in run_filter_main
    _run_filter(output_filter, input_stream=fp_in)
  File "osxcollector/output_filters/base_filters/output_filter.py", line 109, in _run_filter
    blob = output_filter.filter_line(blob)
  File "osxcollector/output_filters/base_filters/chain.py", line 48, in filter_line
    return self._on_filter_line(blob, self._head_of_chain)
  File "osxcollector/output_filters/base_filters/chain.py", line 61, in _on_filter_line
    return self._on_filter_line(link.filter_line(blob), link._next_link)
  File "osxcollector/output_filters/base_filters/chain.py", line 61, in _on_filter_line
    return self._on_filter_line(link.filter_line(blob), link._next_link)
  File "osxcollector/output_filters/base_filters/chain.py", line 61, in _on_filter_line
    return self._on_filter_line(link.filter_line(blob), link._next_link)
  File "osxcollector/output_filters/find_domains.py", line 33, in filter_line
    self._look_for_domains(blob)
  File "osxcollector/output_filters/find_domains.py", line 63, in _look_for_domains
    self._look_for_domains(elem, key)
  File "osxcollector/output_filters/find_domains.py", line 56, in _look_for_domains
    domain = self._url_to_domain(maybe_url)
  File "osxcollector/output_filters/find_domains.py", line 79, in _url_to_domain
    split_url = urlsplit(url)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urlparse.py", line 214, in urlsplit
    raise ValueError("Invalid IPv6 URL")
ValueError: Invalid IPv6 URL

@megancarney identified that this is caused by a URL similar to "https://example.com/#/discover?_g=()&_a=(columns:!(_source),index:%5Blogstash-%5DYYYY.MM,interval:auto,query:(query_string:(analyze_wildcard:!t,query:'*')),sort:!('@timestamp',desc)), basically sort of URLs that Kibana dashboard produces.

@jjsendor jjsendor added the bug label Mar 31, 2016
@jjsendor jjsendor self-assigned this Mar 31, 2016
@jjsendor
Copy link
Contributor Author

This maybe caused by the same problem as #5.

@jjsendor
Copy link
Contributor Author

Closing as it is a duplicate of #5.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant