ROOTPLOIT
Server: LiteSpeed
System: Linux in-mum-web1878.main-hosting.eu 5.14.0-570.21.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 11 07:22:35 EDT 2025 x86_64
User: u435929562 (435929562)
PHP: 7.4.33
Disabled: system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //proc/self/root/opt/go/pkg/mod/go.mongodb.org/[email protected]/testdata/bson-corpus/regex.json
{
    "description": "Regular Expression type",
    "bson_type": "0x0B",
    "test_key": "a",
    "valid": [
        {
            "description": "empty regex with no options",
            "canonical_bson": "0A0000000B6100000000",
            "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"\", \"options\" : \"\"}}}"
        },
        {
            "description": "regex without options",
            "canonical_bson": "0D0000000B6100616263000000",
            "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"abc\", \"options\" : \"\"}}}"
        },
        {
            "description": "regex with options",
            "canonical_bson": "0F0000000B610061626300696D0000",
            "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"abc\", \"options\" : \"im\"}}}"
        },
        {
            "description": "regex with options (keys reversed)",
            "canonical_bson": "0F0000000B610061626300696D0000",
            "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"abc\", \"options\" : \"im\"}}}",
            "degenerate_extjson": "{\"a\" : {\"$regularExpression\" : {\"options\" : \"im\", \"pattern\": \"abc\"}}}"
        },
        {
            "description": "regex with slash",
            "canonical_bson": "110000000B610061622F636400696D0000",
            "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"ab/cd\", \"options\" : \"im\"}}}"
        },
        {
            "description": "flags not alphabetized",
            "degenerate_bson": "100000000B6100616263006D69780000",
            "canonical_bson": "100000000B610061626300696D780000",
            "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"abc\", \"options\" : \"imx\"}}}",
            "degenerate_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"abc\", \"options\" : \"mix\"}}}"
        },
        {
            "description" : "Required escapes",
            "canonical_bson" : "100000000B610061625C226162000000",
            "canonical_extjson": "{\"a\" : {\"$regularExpression\" : { \"pattern\": \"ab\\\\\\\"ab\", \"options\" : \"\"}}}"
        },
        {
            "description" : "Regular expression as value of $regex query operator",
            "canonical_bson" : "180000000B247265676578007061747465726E0069780000",
            "canonical_extjson": "{\"$regex\" : {\"$regularExpression\" : { \"pattern\": \"pattern\", \"options\" : \"ix\"}}}"
        },
        {
            "description" : "Regular expression as value of $regex query operator with $options",
            "canonical_bson" : "270000000B247265676578007061747465726E000002246F7074696F6E73000300000069780000",
            "canonical_extjson": "{\"$regex\" : {\"$regularExpression\" : { \"pattern\": \"pattern\", \"options\" : \"\"}}, \"$options\" : \"ix\"}"
        }
    ],
    "decodeErrors": [
        {
            "description": "Null byte in pattern string",
            "bson": "0F0000000B610061006300696D0000"
        },
        {
            "description": "Null byte in flags string",
            "bson": "100000000B61006162630069006D0000"
        }
    ]
}