2024-01-08 07:36:06 +00:00
|
|
|
diff --git a/src/anyp/Uri.cc b/src/anyp/Uri.cc
|
2024-03-22 07:44:27 +00:00
|
|
|
index 20b9bf1..81ebb18 100644
|
2024-01-08 07:36:06 +00:00
|
|
|
--- a/src/anyp/Uri.cc
|
|
|
|
+++ b/src/anyp/Uri.cc
|
|
|
|
@@ -173,6 +173,10 @@ urlInitialize(void)
|
|
|
|
assert(0 == matchDomainName("*.foo.com", ".foo.com", mdnHonorWildcards));
|
|
|
|
assert(0 != matchDomainName("*.foo.com", "foo.com", mdnHonorWildcards));
|
|
|
|
|
|
|
|
+ assert(0 != matchDomainName("foo.com", ""));
|
|
|
|
+ assert(0 != matchDomainName("foo.com", "", mdnHonorWildcards));
|
|
|
|
+ assert(0 != matchDomainName("foo.com", "", mdnRejectSubsubDomains));
|
|
|
|
+
|
|
|
|
/* more cases? */
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -756,6 +760,8 @@ matchDomainName(const char *h, const char *d, MatchDomainNameFlags flags)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
dl = strlen(d);
|
|
|
|
+ if (dl == 0)
|
|
|
|
+ return 1;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Start at the ends of the two strings and work towards the
|