Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-19970

Reopening db with wrong password succeeds

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • .master
    • .master
    • forestdb
    • Untriaged
    • Unknown
    • ForestDB: Oct 17 - Nov 4

    Description

      Many of my CBL database-encryption unit tests are failing with the latest stable commit of ForestDB. The cause of the failures is that opening a ForestDB database using an incorrect password does not fail, i.e. the call to fdb_open succeeds even though the password is wrong!

      This bug occurs with both encrypted and unencrypted databases, when the configuration includes an encryption key. The strange thing is that a similar test — creating an encrypted database, then trying to open it without a key — still passes (i.e. the database could not be opened.)

      My tests immediately abort after opening the database, so I don't know whether any of the documents in it are readable. I assume not, since the contents are encrypted.

      The following is logged to stderr while opening the database:

      [FDB ERR] Crash Detected: Last Block not DBHEADER c1 in a database file '/var/folders/4f/mvdftm3d5ss0ystm0m2q8q3m0000gn/T/CBL_iOS_Unit_Tests/seekrit.cblite2/db.forest.0'
       
      [FDB ERR] Crash Detected: Last Block not DBHEADER a4 in a database file '/var/folders/4f/mvdftm3d5ss0ystm0m2q8q3m0000gn/T/CBL_iOS_Unit_Tests/seekrit.cblite2/db.forest.0'
       
      [FDB ERR] Crash Detected: Last Block not DBHEADER 16 in a database file '/var/folders/4f/mvdftm3d5ss0ystm0m2q8q3m0000gn/T/CBL_iOS_Unit_Tests/seekrit.cblite2/db.forest.0'
       
      [FDB ERR] Crash Detected: Last Block not DBHEADER c1 in a database file '/var/folders/4f/mvdftm3d5ss0ystm0m2q8q3m0000gn/T/CBL_iOS_Unit_Tests/seekrit.cblite2/db.forest.0'
       
      [FDB INFO] Forestdb opened database file /var/folders/4f/mvdftm3d5ss0ystm0m2q8q3m0000gn/T/CBL_iOS_Unit_Tests/seekrit.cblite2/db.forest.0
      

      Attachments

        For Gerrit Dashboard: MB-19970
        # Subject Branch Project Status CR V

        Activity

          People

            jung-sang Jung-Sang Ahn (Inactive)
            jens Jens Alfke
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty