Project

General

Profile

Bug #4036

encrypted clone_uri can throw unicodeerror after key change

Added by Marcin Kuzminski [staff] about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
Start date:
21.06.2016
Due date:
% Done:

0%

Estimated time:
Sorting:
Commit Number:
Affected Version:

Description

Someone upgraded from EE to CE and go this exception:

INFO  [rhodecode.lib.auth] user <AuthUser('id:4[***] ip:*** auth:True')> authenticating with:RHODECODE_AUTH IS authenticated on func SummaryController:index
Error - <type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode byte 0xa6 in position 0: ordinal not in range(128)
URL: ***
File '/opt/rhodecode/store/l6qpjdhxh6gkgmplvx2qdpswhj5ksy97-python2.7-WebError-0.10.3/lib/python2.7/site-packages/weberror/errormiddleware.py', line 162 in __call__
  app_iter = self.application(environ, sr_checker)
File '/opt/rhodecode/store/i1ax7221bg9k9c9fd3pv3mrlnsvxc11f-python2.7-Routes-1.13/lib/python2.7/site-packages/routes/middleware.py', line 131 in __call__
  response = self.app(environ, start_response)
File '/opt/rhodecode/store/mii099lqnw6anfhgcrb78x7ybvggs7g5-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/wsgiapp.py', line 103 in __call__
  response = self.dispatch(controller, environ, start_response)
File '/opt/rhodecode/store/mii099lqnw6anfhgcrb78x7ybvggs7g5-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/wsgiapp.py', line 313 in dispatch
  return controller(environ, start_response)
File '/opt/rhodecode/store/j5s9ifd76mf9ix7dbnwz0ldlyr2cvs25-python2.7-rhodecode-enterprise-ce-4.1.1/lib/python2.7/site-packages/rhodecode/lib/base.py', line 461 in __call__
  return WSGIController.__call__(self, environ, start_response)
File '/opt/rhodecode/store/mii099lqnw6anfhgcrb78x7ybvggs7g5-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/controllers/core.py', line 214 in __call__
  response = self._dispatch_call()
File '/opt/rhodecode/store/mii099lqnw6anfhgcrb78x7ybvggs7g5-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/controllers/core.py', line 164 in _dispatch_call
  response = self._inspect_call(func)
File '/opt/rhodecode/store/mii099lqnw6anfhgcrb78x7ybvggs7g5-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/controllers/core.py', line 107 in _inspect_call
  result = self._perform_call(func, args)
File '/opt/rhodecode/store/mii099lqnw6anfhgcrb78x7ybvggs7g5-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/controllers/core.py', line 57 in _perform_call
  return func(**args)
File '/opt/rhodecode/store/j5s9ifd76mf9ix7dbnwz0ldlyr2cvs25-python2.7-rhodecode-enterprise-ce-4.1.1/lib/python2.7/site-packages/rhodecode/lib/auth.py', line 1896 in local_wrapper
  return wrapper(func, *args, **kwds)
File '/opt/rhodecode/store/j5s9ifd76mf9ix7dbnwz0ldlyr2cvs25-python2.7-rhodecode-enterprise-ce-4.1.1/lib/python2.7/site-packages/rhodecode/lib/auth.py', line 1219 in __wrapper
  return func(*fargs, **fkwargs)
File '/opt/rhodecode/store/j5s9ifd76mf9ix7dbnwz0ldlyr2cvs25-python2.7-rhodecode-enterprise-ce-4.1.1/lib/python2.7/site-packages/rhodecode/lib/auth.py', line 1896 in local_wrapper
  return wrapper(func, *args, **kwds)
File '/opt/rhodecode/store/j5s9ifd76mf9ix7dbnwz0ldlyr2cvs25-python2.7-rhodecode-enterprise-ce-4.1.1/lib/python2.7/site-packages/rhodecode/lib/auth.py', line 1329 in __wrapper
  return func(*fargs, **fkwargs)
File '/opt/rhodecode/store/j5s9ifd76mf9ix7dbnwz0ldlyr2cvs25-python2.7-rhodecode-enterprise-ce-4.1.1/lib/python2.7/site-packages/rhodecode/controllers/summary.py', line 175 in index
  return render('summary/summary.html')
File '/opt/rhodecode/store/mii099lqnw6anfhgcrb78x7ybvggs7g5-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/templating.py', line 244 in render_mako
  cache_type=cache_type, cache_expire=cache_expire)
File '/opt/rhodecode/store/mii099lqnw6anfhgcrb78x7ybvggs7g5-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/templating.py', line 219 in cached_template
  return render_func()
File '/opt/rhodecode/store/mii099lqnw6anfhgcrb78x7ybvggs7g5-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/templating.py', line 241 in render_template
  return literal(template.render_unicode(**globs))
File '/opt/rhodecode/store/ddcvr7xma53gx5qv7b5h6lsvqcbhm6xx-python2.7-Mako-1.0.1/lib/python2.7/site-packages/mako/template.py', line 452 in render_unicode
  as_unicode=True)
File '/opt/rhodecode/store/ddcvr7xma53gx5qv7b5h6lsvqcbhm6xx-python2.7-Mako-1.0.1/lib/python2.7/site-packages/mako/runtime.py', line 803 in _render
  **_kwargs_for_callable(callable_, data))
File '/opt/rhodecode/store/ddcvr7xma53gx5qv7b5h6lsvqcbhm6xx-python2.7-Mako-1.0.1/lib/python2.7/site-packages/mako/runtime.py', line 835 in _render_context
  _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File '/opt/rhodecode/store/ddcvr7xma53gx5qv7b5h6lsvqcbhm6xx-python2.7-Mako-1.0.1/lib/python2.7/site-packages/mako/runtime.py', line 855 in _exec_template
  _render_error(template, context, compat.exception_as())
File '/opt/rhodecode/store/ddcvr7xma53gx5qv7b5h6lsvqcbhm6xx-python2.7-Mako-1.0.1/lib/python2.7/site-packages/mako/runtime.py', line 864 in _render_error
  result = template.error_handler(context, error)
File '/opt/rhodecode/store/ddcvr7xma53gx5qv7b5h6lsvqcbhm6xx-python2.7-Mako-1.0.1/lib/python2.7/site-packages/mako/runtime.py', line 853 in _exec_template
  callable_(context, *args, **kwargs)
File '/home/***/.rccontrol/community-1/data/templates/base/root.html.py', line 58 in render_body
  __M_writer(escape(next.body()))
File '/home/***/.rccontrol/community-1/data/templates/base/base.html.py', line 56 in render_body
  __M_writer(escape(next.main()))
File '/home/***/.rccontrol/community-1/data/templates/summary/base.html.py', line 49 in render_main
  __M_writer(escape(next.main()))
File '/home/***/.rccontrol/community-1/data/templates/summary/summary.html.py', line 53 in render_main
  __M_writer(escape(self.repo_page_title(c.rhodecode_db_repo)))
File '/home/***/.rccontrol/community-1/data/templates/base/base.html.py', line 408 in render_repo_page_title
  __M_writer(escape(h.url(str(h.hide_credentials(repo_instance.clone_uri)))))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa6 in position 0: ordinal not in range(128)

I think becuase of ecnryption key changed the clone_uri have some odd characters and call for str() crashes.

Also available in: Atom PDF