Browse Source

Merge pull request #49505 from underdoeg/patch-2

fix url parsing with port numbers
Rémi Verschelde 4 years ago
parent
commit
badad53438
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/string/ustring.cpp

+ 1 - 1
core/string/ustring.cpp

@@ -275,7 +275,7 @@ Error String::parse_url(String &r_scheme, String &r_host, int &r_port, String &r
 		base = base.substr(pos + 1, base.length() - pos - 1);
 		base = base.substr(pos + 1, base.length() - pos - 1);
 	} else {
 	} else {
 		// Anything else
 		// Anything else
-		if (base.get_slice_count(":") > 1) {
+		if (base.get_slice_count(":") > 2) {
 			return ERR_INVALID_PARAMETER;
 			return ERR_INVALID_PARAMETER;
 		}
 		}
 		pos = base.rfind(":");
 		pos = base.rfind(":");