f5devcentral / f5-automation-config-converter

Convert BIG-IP configs to AS3 and DO declarations
https://clouddocs.f5.com/products/extensions/f5-automation-config-converter/latest/
Apache License 2.0
35 stars 13 forks source link

Strings containing braces might cause an indefinite hang #79

Closed jszczepanskif5 closed 2 years ago

jszczepanskif5 commented 2 years ago

Environment

Summary

I've encountered this fun quoting corner case a while ago in a client UCS, only now tried to run it through ACC.

Brace matching might be broken in some strings-containing-braces scenarios, resulting in an indefinite freeze. Might be related to #78

Steps To Reproduce

Steps to reproduce the behavior:

  1. Convert any of the following configs:

    ltm data-group internal /Common/regexp_special_characters {
    records {
        " " {
            data LostInSpace
        }
        "\\{" {
            data BracketStart
        }
        "\\}" {
            data BracketEnd
        }
    }
    type string
    }
    ltm data-group internal /Common/regexp_restore_characters {
    records {
        BracketEnd {
            data }
        }
        BracketStart {
            data {
        }
        LostInSpace {
            data " "
        }
    }
    type string
    }
  2. ACC is now frozen indefinitely.

Note that unquoted strings { and } seemingly might also appear in other places in config; unsure if in all string-type fields.

[root@localhost:LICENSE EXPIRED:Standalone] config # tmsh modify auth user admin description "\{"    
[root@localhost:LICENSE EXPIRED:Standalone] config # tmsh list auth user admin
auth user admin {
    description {
    encrypted-password 123
    partition Common
    partition-access {
        all-partitions {
            role admin
        }
    }
    session-limit -1
    shell none
}
delgadillo22 commented 2 years ago

Thank you for the report, I've added this to our internal backlog as CHARON-587 and will get this prioritized.

p-semenov-f5 commented 2 years ago

Fixed in 1.19