mirror of
https://github.com/asterisk/asterisk.git
synced 2026-06-04 10:22:01 +00:00
res_pjsip: Don't allow a leading period when wildcard matching
The reference identifier (what the client provides - in this case a hostname) must start with a domain label, not a `.`. The current implementation will match `.seanbright.com` against `*.seanbright.com` which is incorrect.
This commit is contained in:
@@ -212,7 +212,7 @@ static int verify_cert_name(const pj_str_t *local, const pj_str_t *remote)
|
||||
}
|
||||
|
||||
p = pj_strchr(local, '.');
|
||||
if (!p) {
|
||||
if (!p || p == pj_strbuf(local)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user