From 283ee1c56dea7629f3736463c82b361e36d5b969 Mon Sep 17 00:00:00 2001 From: Levent K Date: Mon, 26 Sep 2022 15:17:38 +0200 Subject: [PATCH] Fix regex for comma seperated values WWW-Authenticate Header (for example `'algorithm=MD5,realm="local",nonce="11111111:222222aaaaaa333333bbbbbb44444"'`) is not parsed correctly in line 455. My proposed change resolves this problem. --- pyVoIP/SIP.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyVoIP/SIP.py b/pyVoIP/SIP.py index 8999cd2..a6c5aec 100644 --- a/pyVoIP/SIP.py +++ b/pyVoIP/SIP.py @@ -341,7 +341,7 @@ def __init__(self, data: bytes): self.body: Dict[str, Any] = {} self.authentication: Dict[str, str] = {} self.raw = data - self.auth_match = re.compile('(\w+)=("[^"]+"|[^ \t]+)') + self.auth_match = re.compile('(\w+)=("[^",]+"|[^ \t,]+)') self.parse(data) def summary(self) -> str: