Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-3136

[backport] Malformed hostname can cause a crash.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0.2
    • 2.8.9
    • Java, Java-Android
    • Security Level: Public
    • None
    • 3

    Description

      A malformed hostname can cause the AbstractC4WebSocket constructor to throw and exception. This is eventually translated to a UnsupportedOperationException thrown by SocketFactory to C4Socket.open.

      This is one of several ways that the latter method can receive an exception and it has no way at all to cope with any of them.

      In particular, it will not tell Core that the open failed and will not, immediately dispose of the LiteCore peer object.

      Any uncaught exception while core is attempting to open a connection to the remote will cause the app to crash.  I think that a combination of Core timeout and a finalizer on the Java socket object keep this from being a serious problem for exceptions that are caught.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              blake.meike Blake Meike
              blake.meike Blake Meike
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty