Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit 3306fad

Browse files
author
the-djmaze
committed
MS autodiscover priorities DNS over subdomain
1 parent 9e2b9a9 commit 3306fad

File tree

1 file changed

+10
-10
lines changed
  • snappymail/v/0.0.0/app/libraries/RainLoop/Providers/Domain

1 file changed

+10
-10
lines changed

snappymail/v/0.0.0/app/libraries/RainLoop/Providers/Domain/Autoconfig.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,6 @@ private static function srv(string $domain) : ?array
168168
*/
169169
private static function autodiscover(string $domain) : ?array
170170
{
171-
foreach ([
172-
"https://{$domain}",
173-
"https://autodiscover.{$domain}",
174-
"http://autodiscover.{$domain}"
175-
] as $host) {
176-
$result = static::autodiscover_resolve($host, $domain);
177-
if ($result) {
178-
return $result;
179-
}
180-
}
181171
foreach (\SnappyMail\DNS::SRV("_autodiscover._tcp.{$domain}") as $record) {
182172
if (443 == $record['port']) {
183173
$result = static::autodiscover_resolve("https://{$record['target']}", $domain);
@@ -190,6 +180,16 @@ private static function autodiscover(string $domain) : ?array
190180
return $result;
191181
}
192182
}
183+
foreach ([
184+
"https://{$domain}",
185+
"https://autodiscover.{$domain}",
186+
"http://autodiscover.{$domain}"
187+
] as $host) {
188+
$result = static::autodiscover_resolve($host, $domain);
189+
if ($result) {
190+
return $result;
191+
}
192+
}
193193
return null;
194194
}
195195

0 commit comments

Comments
 (0)