You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
794 B
25 lines
794 B
diff --git a/src/anyp/Uri.cc b/src/anyp/Uri.cc
|
|
index 20b9bf1..81ebb18 100644
|
|
--- 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
|