Project

General

Profile

Bug #83075

Fix traceback when exporting certificate from CA

Added by Caleb St. John over 2 years ago. Updated over 2 years ago.

Status:
Ready for Testing
Priority:
No priority
Assignee:
Waqar Ahmed
Category:
Middleware
Target version:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
UTB-301-88327
Hardware Configuration:
ChangeLog Required:
No

Description

Customer has a CA that he is trying to export the certificate from the webUI. Upon pushing "Export Certificate" he receives the following traceback.

Request Method: GET
Request URL: http://192.168.3.200/system/CA/export/certificate/7/
Software Version: TrueNAS-11.1-U7 (b45bfcf29)
Exception Type: MiddlewareError
Exception Value:
[MiddlewareError: sequence item 0: expected str instance, bytes found]
Exception Location: ./freenasUI/system/views.py in CA_export_certificate, line 1931
Server time: Wed, 20 Mar 2019 11:12:56 -0400

Environment:

Software Version: TrueNAS-11.1-U7 (b45bfcf29)
Request Method: GET
Request URL: http://192.168.3.200/system/CA/export/certificate/7/

Traceback:
File "./freenasUI/system/views.py" in CA_export_certificate
1927. cert = export_certificate_chain(ca.cert_certificate)
File "./freenasUI/common/ssl.py" in export_certificate_chain
193. return ''.join(certificates).strip()
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
42. response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
249. response = self._get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
178. response = middleware_method(request, callback, callback_args, callback_kwargs)
File "./freenasUI/freeadmin/middleware.py" in process_view
162. return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)
File "./freenasUI/system/views.py" in CA_export_certificate
1931. raise MiddlewareError(e)

Exception Type: MiddlewareError at /system/CA/export/certificate/7/
Exception Value: [MiddlewareError: sequence item 0: expected str instance, bytes found]

Related issues

Copied to FreeNAS - Bug #83827: Fix traceback when exporting certificate from CAReady for Testing

Associated revisions

Revision e8fc319b (diff)
Added by Waqar Ahmed over 2 years ago

Correct encoding logic for certificates This commit corrects encoding logic for certificates where we tried to join list of bytes on a string. Ticket: #83075

Revision 3d02398d (diff)
Added by Waqar Ahmed over 2 years ago

Correct encoding logic for certificates This commit corrects encoding logic for certificates where we tried to join list of bytes on a string. Ticket: #83075 (cherry picked from commit e8fc319b0e374bcedebb47824840f9ec3f221441)

History

#1 Updated by Caleb St. John over 2 years ago

  • Support Suite Ticket changed from n/a to UTB-301-88327

#2 Updated by Dru Lavigne over 2 years ago

  • Assignee changed from Release Council to William Grzybowski
  • Private changed from No to Yes

#3 Updated by William Grzybowski over 2 years ago

  • Assignee changed from William Grzybowski to Waqar Ahmed

#5 Updated by Bug Clerk over 2 years ago

  • Status changed from Unscreened to In Progress

#6 Updated by Bug Clerk over 2 years ago

  • Status changed from In Progress to Ready for Testing

#7 Updated by Bug Clerk over 2 years ago

  • Target version changed from TrueNAS 11.1-U8 to 11.2-U4

#8 Updated by Bug Clerk over 2 years ago

  • Copied to Bug #83827: Fix traceback when exporting certificate from CA added

#10 Updated by Dru Lavigne over 2 years ago

  • Subject changed from traceback when exporting certificate from CA to Fix traceback when exporting certificate from CA
  • Private changed from Yes to No
  • Needs Merging changed from Yes to No

Also available in: Atom PDF