Project

Profile

Help

Issue #3253

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

Added by mansari over 2 years ago. Updated 3 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
2.17.0
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

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

Associated revisions

Revision 5df74b27 View on GitHub
Added by mansari about 2 years ago

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

Revision 3fba75b8 View on GitHub
Added by ttereshc about 2 years ago

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

This reverts commit 5df74b2755e06fcb8f10b803dca0fb607c96a9d9.

re #3253

Revision 4da32670 View on GitHub
Added by mansari about 2 years ago

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

History

#2 Updated by mansari over 2 years ago

  • Status changed from ASSIGNED to POST

#3 Updated by mansari about 2 years ago

  • Status changed from POST to MODIFIED

#4 Updated by ttereshc about 2 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

#5 Updated by mansari about 2 years ago

  • Status changed from ASSIGNED to POST

#6 Updated by ttereshc about 2 years ago

  • Project changed from Nectar to Pulp

#7 Updated by mansari about 2 years ago

  • Status changed from POST to MODIFIED

#8 Updated by dkliban@redhat.com over 1 year ago

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

#9 Updated by bmbouter about 1 year ago

  • Tags Pulp 2 added

#10 Updated by victorialogan 9 months ago

update new version release in street view

#11 Updated by msflower 6 months ago

I love your blog! I am hoping to see more articles from you in the foreseeable future. Really great!!!
helix jump

#12 Updated by aladanh 3 months ago

have a nice day. a good working day gmail sign up

Please register to edit this issue

Also available in: Atom PDF