mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-24 05:18:58 +00:00
Merge branch 'master' into converter-optimizations
This commit is contained in:
commit
9d93a31755
@ -23,6 +23,12 @@ public class EdgeDomain implements Serializable {
|
|||||||
|
|
||||||
host = host.toLowerCase();
|
host = host.toLowerCase();
|
||||||
|
|
||||||
|
// Remove trailing dots, which are allowed in DNS but not in URLs
|
||||||
|
// (though sometimes still show up in the wild)
|
||||||
|
while (!host.isBlank() && host.endsWith(".")) {
|
||||||
|
host = host.substring(0, host.length() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
var dot = host.lastIndexOf('.');
|
var dot = host.lastIndexOf('.');
|
||||||
|
|
||||||
if (dot < 0 || looksLikeAnIp(host)) { // IPV6 >.>
|
if (dot < 0 || looksLikeAnIp(host)) { // IPV6 >.>
|
||||||
|
Loading…
Reference in New Issue
Block a user