Issue #3253
closedUnicodeDecodeError in case of a non-ASCII character in comments provided with SSL cert/key/CA
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
Updated by mansari over 6 years ago
- Status changed from ASSIGNED to POST
Added by mansari over 6 years ago
Updated by mansari over 6 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp:pulp|5df74b2755e06fcb8f10b803dca0fb607c96a9d9.
Added by ttereshc over 6 years ago
Revision 3fba75b8 | View on GitHub
Revert "UnicodeDecodeError in comments provided with SSL cert/key"
This reverts commit 5df74b2755e06fcb8f10b803dca0fb607c96a9d9.
re #3253
Updated by ttereshc over 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 over 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'.
Updated by mansari over 6 years ago
- Status changed from ASSIGNED to POST
Updated by mansari over 6 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp|4da326704886c67506c84e96229355728ef2bc69.
Updated by dkliban@redhat.com almost 6 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
- Platform Release set to 2.17.0
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