[GH-ISSUE #205] EmptyLabel exception #185

Closed
opened 2026-02-26 09:36:23 +03:00 by kerem · 0 comments
Owner

Originally created by @ThomasWaldmann on GitHub (May 18, 2015).
Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/205

Originally assigned to: @ThomasWaldmann on GitHub.

The domain name needs to get validated when a domain is added.

Domain 243 was named: .info

Internal Server Error: /host/add/
Traceback (most recent call last):
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/utils/decorators.py", line 29, in _wrapper
    return bound_func(*args, **kwargs)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/utils/decorators.py", line 25, in bound_func
    return func.__get__(self, type(self))(*args2, **kwargs2)
  File "/srv/nsupdate.info/repo/nsupdate/main/views.py", line 200, in dispatch
    return super(AddHostView, self).dispatch(*args, **kwargs)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/base.py", line 87, in dispatch
    return handler(request, *args, **kwargs)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/edit.py", line 207, in post
    return super(BaseCreateView, self).post(request, *args, **kwargs)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/edit.py", line 173, in post
    return self.form_valid(form)
  File "/srv/nsupdate.info/repo/nsupdate/main/views.py", line 214, in form_valid
    dnstools.add(self.object.get_fqdn(), normalize_ip(self.request.META['REMOTE_ADDR']))
  File "/srv/nsupdate.info/repo/nsupdate/main/dnstools.py", line 116, in add
    current_ipaddr = query_ns(fqdn, rdtype)
  File "/srv/nsupdate.info/repo/nsupdate/main/dnstools.py", line 228, in query_ns
    answer = resolver.query(str(fqdn), rdtype)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/resolver.py", line 777, in query
    qname = dns.name.from_text(qname, None)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/name.py", line 650, in from_text
    raise EmptyLabel
EmptyLabel

Request repr(): 
<WSGIRequest
path:/host/add/,
GET:<QueryDict: {}>,
POST:<QueryDict: {u'domain': [u'243'], u'name': [u'1'], u'comment': [u'test']}>,
META:{'CONTENT_LENGTH': '83',
...
 'HTTP_REFERER': 'https://nsupdate.info/host/add/',
 'REQUEST_METHOD': 'POST',
 'REQUEST_URI': '/host/add/',
'wsgi.url_scheme': 'https',
 'wsgi.version': (1, 0)}>
Originally created by @ThomasWaldmann on GitHub (May 18, 2015). Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/205 Originally assigned to: @ThomasWaldmann on GitHub. The domain name needs to get validated when a domain is added. Domain 243 was named: .info ``` Internal Server Error: /host/add/ Traceback (most recent call last): File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view return self.dispatch(request, *args, **kwargs) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/utils/decorators.py", line 29, in _wrapper return bound_func(*args, **kwargs) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view return view_func(request, *args, **kwargs) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/utils/decorators.py", line 25, in bound_func return func.__get__(self, type(self))(*args2, **kwargs2) File "/srv/nsupdate.info/repo/nsupdate/main/views.py", line 200, in dispatch return super(AddHostView, self).dispatch(*args, **kwargs) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/base.py", line 87, in dispatch return handler(request, *args, **kwargs) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/edit.py", line 207, in post return super(BaseCreateView, self).post(request, *args, **kwargs) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/edit.py", line 173, in post return self.form_valid(form) File "/srv/nsupdate.info/repo/nsupdate/main/views.py", line 214, in form_valid dnstools.add(self.object.get_fqdn(), normalize_ip(self.request.META['REMOTE_ADDR'])) File "/srv/nsupdate.info/repo/nsupdate/main/dnstools.py", line 116, in add current_ipaddr = query_ns(fqdn, rdtype) File "/srv/nsupdate.info/repo/nsupdate/main/dnstools.py", line 228, in query_ns answer = resolver.query(str(fqdn), rdtype) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/resolver.py", line 777, in query qname = dns.name.from_text(qname, None) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/dns/name.py", line 650, in from_text raise EmptyLabel EmptyLabel Request repr(): <WSGIRequest path:/host/add/, GET:<QueryDict: {}>, POST:<QueryDict: {u'domain': [u'243'], u'name': [u'1'], u'comment': [u'test']}>, META:{'CONTENT_LENGTH': '83', ... 'HTTP_REFERER': 'https://nsupdate.info/host/add/', 'REQUEST_METHOD': 'POST', 'REQUEST_URI': '/host/add/', 'wsgi.url_scheme': 'https', 'wsgi.version': (1, 0)}> ```
kerem closed this issue 2026-02-26 09:36:23 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nsupdate.info-nsupdate-info#185
No description provided.