Uploaded image for project: 'FreeNAS / TrueNAS'
  1. FreeNAS / TrueNAS
  2. NAS-101179

Fix traceback when exporting certificate from CA

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done (View Workflow)
    • Priority: Low
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 11.2-U4
    • Component/s: Middleware
    • Labels:
      None
    • Support Suite Ticket:
      UTB-301-88327

      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]

        Attachments

        1. CA.png
          CA.png
          62 kB
        2. CA2.png
          CA2.png
          61 kB

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                waqar Waqar Ahmed
                Reporter:
                caleb Caleb St. John
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Summary Panel