[GH-ISSUE #282] update: UnicodeDecodeError #228

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

Originally created by @ThomasWaldmann on GitHub (Sep 5, 2016).
Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/282

Originally assigned to: @ThomasWaldmann on GitHub.

Internal Server Error: /nic/update
Traceback (most recent call last):
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, 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 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
    return handler(request, *args, **kwargs)
  File "/srv/nsupdate.info/repo/nsupdate/utils/log.py", line 124, in caller
    return func(*args, **kwargs)
  File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 203, in get
    username, password = basic_authenticate(auth)
  File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 124, in basic_authenticate
    auth = base64.b64decode(auth.strip()).decode('utf-8')
  File "/srv/nsupdate.info/env/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xb6 in position 45: invalid start byte
Originally created by @ThomasWaldmann on GitHub (Sep 5, 2016). Original GitHub issue: https://github.com/nsupdate-info/nsupdate.info/issues/282 Originally assigned to: @ThomasWaldmann on GitHub. ``` Internal Server Error: /nic/update Traceback (most recent call last): File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, 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 71, in view return self.dispatch(request, *args, **kwargs) File "/srv/nsupdate.info/env/local/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch return handler(request, *args, **kwargs) File "/srv/nsupdate.info/repo/nsupdate/utils/log.py", line 124, in caller return func(*args, **kwargs) File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 203, in get username, password = basic_authenticate(auth) File "/srv/nsupdate.info/repo/nsupdate/api/views.py", line 124, in basic_authenticate auth = base64.b64decode(auth.strip()).decode('utf-8') File "/srv/nsupdate.info/env/lib/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xb6 in position 45: invalid start byte ```
kerem closed this issue 2026-02-26 09:36:44 +03:00
Author
Owner

@ThomasWaldmann commented on GitHub (Sep 5, 2016):

Guess we won't support anything else than utf-8, but check that we fail gracefully here and return an appropriate http error code to the update client.

<!-- gh-comment-id:244733497 --> @ThomasWaldmann commented on GitHub (Sep 5, 2016): Guess we won't support anything else than utf-8, but check that we fail gracefully here and return an appropriate http error code to the update client.
Author
Owner

@ThomasWaldmann commented on GitHub (Sep 5, 2016):

Hmm, the decode fail is in the password part of the http auth header and it maybe was iso-8859-5.

<!-- gh-comment-id:244734410 --> @ThomasWaldmann commented on GitHub (Sep 5, 2016): Hmm, the decode fail is in the password part of the http auth header and it maybe was iso-8859-5.
Author
Owner

@ThomasWaldmann commented on GitHub (Sep 5, 2016):

Hmm, considering that we generate a ascii per-host update secret, this must be a user fault also.
Either he just entered some crap or his fritzbox is dying or he entered his user login password, which is not the same as the host update password.

<!-- gh-comment-id:244749909 --> @ThomasWaldmann commented on GitHub (Sep 5, 2016): Hmm, considering that we generate a ascii per-host update secret, this must be a user fault also. Either he just entered some crap or his fritzbox is dying or he entered his user login password, which is not the same as the host update password.
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#228
No description provided.