Project

Profile

Help

Issue #3253

closed

UnicodeDecodeError in case of a non-ASCII character in comments provided with SSL cert/key/CA

Added by mansari about 6 years ago. Updated almost 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.17.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656) Traceback (most recent call last):
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656)   File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 411, in create_repo
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656)     importer_controller.set_importer(repo_id, importer_type_id, importer_repo_plugin_config)
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656)   File "/usr/lib/python2.7/site-packages/celery/local.py", line 167, in <lambda>
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656)     __call__ = lambda x, *a, **kw: x._get_current_object()(*a, **kw)
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656)   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 473, in __call__
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656)     return super(Task, self).__call__(*args, **kwargs)
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656)   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 103, in __call__
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656)     return super(PulpTask, self).__call__(*args, **kwargs)
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656)   File "/usr/lib/python2.7/site-packages/celery/app/task.py", line 420, in __call__
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656)     return self.run(*args, **kwargs)
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656)   File "/usr/lib/python2.7/site-packages/pulp/server/controllers/importer.py", line 112, in set_importer
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656)     importer.save()
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656)   File "/usr/lib/python2.7/site-packages/pulp/server/db/model/__init__.py", line 283, in save
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656)     self._write_pem_file(key, path)
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656)   File "/usr/lib/python2.7/site-packages/pulp/server/db/model/__init__.py", line 347, in _write_pem_file
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656)     pem_file.write(self.config[config_key].encode('utf-8'))
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-74656) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 58892: ordinal not in range(128)
Nov 16 08:00:38 ilnxcapl01 pulp: pulp.server.controllers.repository:ERROR: (29604-21568) Exception adding importer to repo [belastingdienst-Production-soe-rhel7-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_RH_Common_RPMs_x86_64_7Server]; the repo will be deleted

It happens when Pulp is trying to write a provided SSL cert/key/ on a disk

Actions #2

Updated by mansari about 6 years ago

  • Status changed from ASSIGNED to POST

Added by mansari about 6 years ago

Revision 5df74b27 | View on GitHub

UnicodeDecodeError in comments provided with SSL cert/key

Writing SSL certs/key to file that contain non-ascii characters raises a UnicodeDecodeError in Pulp, since Python 2 by default decodes objects as 'ascii'.

closes #3253

Actions #3

Updated by mansari about 6 years ago

  • Status changed from POST to MODIFIED

Added by ttereshc about 6 years ago

Revision 3fba75b8 | View on GitHub

Revert "UnicodeDecodeError in comments provided with SSL cert/key"

This reverts commit 5df74b2755e06fcb8f10b803dca0fb607c96a9d9.

re #3253

Actions #4

Updated by ttereshc about 6 years ago

  • Status changed from MODIFIED to ASSIGNED

PR was merged without approval from all the reviewers. The commit was reverted.
Please re-open PR and merge only after all reviewers approve PR.
Thanks

Added by mansari about 6 years ago

Revision 4da32670 | View on GitHub

UnicodeDecodeError in comments provided with SSL cert/key

Writing SSL certs/key to file that contain non-ascii characters raises a UnicodeDecodeError in Pulp, since Python 2 by default decodes objects as 'ascii'.

closes #3253 https://pulp.plan.io/issues/3253

Actions #5

Updated by mansari about 6 years ago

  • Status changed from ASSIGNED to POST
Actions #6

Updated by ttereshc about 6 years ago

  • Project changed from Nectar to Pulp
Actions #7

Updated by mansari almost 6 years ago

  • Status changed from POST to MODIFIED
Actions #8

Updated by dkliban@redhat.com over 5 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE
  • Platform Release set to 2.17.0
Actions #9

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF