Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-8499

[useradmin] Fix ensure_home_directory if path contains special character

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 4.1.0
    • Fix Version/s: None
    • Component/s: core.users
    • Labels:
      None

      Description

      [14/Aug/2018 14:47:51 -0700] middleware   INFO     Processing exception: 'ascii' codec can't decode byte 0xc3 in position 11: ordinal not in range(128): Traceback (most recent call last):
        File "/etc/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 112, in get_response
          response = wrapped_callback(request, *callback_args, **callback_kwargs)
        File "/etc/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py", line 371, in inner
          return func(*args, **kwargs)
        File "/etc/lib/hue/apps/useradmin/src/useradmin/views.py", line 568, in add_ldap_users
          ensure_home_directory(request.fs, user)
        File "/etc/lib/hue/apps/useradmin/src/useradmin/views.py", line 803, in ensure_home_directory
          fs.do_as_user(username, fs.create_home_dir, home_directory)
        File "/etc/lib/hue/desktop/core/src/desktop/lib/fs/proxyfs.py", line 102, in do_as_user
          return fn(*args, **kwargs)
        File "/etc/lib/hue/desktop/core/src/desktop/lib/fs/proxyfs.py", line 171, in create_home_dir
          self._get_fs(home_path).create_home_dir(home_path)
        File "/etc/lib/hue/desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py", line 247, in create_home_dir
          if not self.exists(home_path):
        File "/etc/lib/hue/desktop/libs/hadoop/src/hadoop/fs/webhdfs.py", line 297, in exists
          return self._stats(path) is not None
        File "/etc/lib/hue/desktop/libs/hadoop/src/hadoop/fs/webhdfs.py", line 281, in _stats
          return WebHdfsStat(json['FileStatus'], path)
        File "/etc/lib/hue/desktop/libs/hadoop/src/hadoop/fs/webhdfs_types.py", line 36, in __init__
          self.path = Hdfs.join(parent_path, self.name)
        File "/etc/lib/hue/desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py", line 186, in join
          return posixpath.join(first, *comp_list)
        File "/etc/lib/hue/build/env/lib/python2.7/posixpath.py", line 73, in join
          path += '/' + b
      UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 11: ordinal not in range(128) 

        Attachments

          Activity

            People

            • Assignee:
              yingc Ying Chen
              Reporter:
              yingc Ying Chen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: