Configuration parsing error when the encryption keyid contains escaped characters

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Configuration
    • None
    • Storage Engines, Storage Engines - Foundations
    • SE Foundations - 2025-07-18
    • 3
    • 0

      The issue can be reproduced using this diff:

      commit 9646ff2464ec0cf662904a32661b3789bf5aa6fb (HEAD -> develop, origin/mongodb-master, origin/develop, origin/HEAD)
      
      diff --git a/test/suite/test_encrypt01.py b/test/suite/test_encrypt01.py
      index 52a80eaed0..4cceff37e6 100644
      --- a/test/suite/test_encrypt01.py
      +++ b/test/suite/test_encrypt01.py
      @@ -56,7 +56,7 @@ class test_encrypt01(wttest.WiredTigerTestCase):
                   file_encrypt='none', file_encrypt_args='')),
               ('nop', dict( sys_encrypt='nop', sys_encrypt_args='',
                   file_encrypt='nop', file_encrypt_args='')),
      -        ('rotn', dict( sys_encrypt='rotn', sys_encrypt_args=',keyid=11',
      +        ('rotn', dict( sys_encrypt='rotn', sys_encrypt_args=',keyid=\"11\n\"',
                   file_encrypt='rotn', file_encrypt_args=',keyid=13')),
               ('rotn-none', dict( sys_encrypt='rotn', sys_encrypt_args=',keyid=9',
                   file_encrypt='none',  file_encrypt_args='')),
      

      The error is:

      "[1747895963:492743][46785:0x20b4edf00], wiredtiger_open: [WT_VERB_DEFAULT][ERROR]: int __config_err(WT_CONFIG *, const char *, int), 19: Error parsing 'create,error_prefix="test_encrypt01.test_encrypt01.test_encrypt(file.rotn.snappy-lz4.earlyLoadFalse)",encryption=(name=rotn,keyid="11
      "),log=(compressor=snappy),,statistics=(all),statistics_log=(wait=1,json=true,on_close=true),extensions=["/wiredtiger/build/ext/encryptors/rotn/libwiredtiger_rotn.so","/wiredtiger/build/ext/compressors/lz4/libwiredtiger_lz4.so","/wiredtiger/build/ext/compressors/snappy/libwiredtiger_snappy.so"]' at offset 133: Unexpected character: Invalid argument
      "
      

      Definition of done:

      • Should escaped characters be accepted? If yes, we should not return an error, otherwise, we could have a better error like in __str_name_check

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: