Router: fixed crash when matching an empty address pattern array.

A crash would occur when the router tried to match an
against an empty address pattern array.

The following configuration was used to reproduce the
issue:

{
    "listeners": {
        "127.0.0.1:8082": {
            "pass": "routes"
        }
    },
    "routes": [
        {
            "match": {
                "source": []
            },
            "action": {
                "return": 200
            }
        }
    ]
}
This commit is contained in:
Oisin Canty
2021-08-05 16:00:01 +00:00
parent 44fe31dc61
commit 60cf139961
3 changed files with 16 additions and 0 deletions

View File

@@ -99,6 +99,13 @@ or "upstreams" using a variable "pass" option.
</para>
</change>
<change type="bugfix">
<para>
the router process crashed while matching a request to an empty array of
source or destination address patterns.
</para>
</change>
</changes>