Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable1.12] fix(autoconfig): Disable buggy DNS query #9973

Open
wants to merge 3 commits into
base: stable1.12
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ocp-version: [ 'dev-master', 'dev-stable24', 'dev-stable23', 'dev-stable22', 'dev-stable21' ]
ocp-version: [ 'dev-stable24', 'dev-stable23', 'dev-stable22', 'dev-stable21' ]
name: Nextcloud ${{ matrix.ocp-version }}
steps:
- name: Checkout
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ jobs:
nextcloud-versions: stable24
- php-versions: 8.0
nextcloud-versions: stable24
- php-versions: 7.4
nextcloud-versions: master
- php-versions: 8.0
nextcloud-versions: master
name: Nextcloud ${{ matrix.nextcloud-versions }} php${{ matrix.php-versions }} unit tests
steps:
- name: Set up php${{ matrix.php-versions }}
Expand Down Expand Up @@ -95,7 +91,7 @@ jobs:
--health-timeout=5s
--health-retries=3
postgres-service:
image: postgres
image: postgres:14
env:
POSTGRES_USER: nextcloud
POSTGRES_DB: nextcloud
Expand Down
13 changes: 3 additions & 10 deletions lib/Service/AutoConfig/IspDb.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public function getUrls(): array {
];
}

public function __construct(IClientService $clientService, LoggerInterface $logger) {
public function __construct(IClientService $clientService,
LoggerInterface $logger) {
$this->client = $clientService->newClient();
$this->logger = $logger;
}
Expand Down Expand Up @@ -122,7 +123,7 @@ private function convertServerElement(\SimpleXMLElement $server): array {
* @param bool $tryMx
* @return array
*/
public function query(string $domain, string $email, bool $tryMx = true): array {
public function query(string $domain, string $email): array {
$this->logger->debug("IsbDb: querying <$domain>");
if (strpos($domain, '@') !== false) {
// TODO: use horde mail address parsing instead
Expand All @@ -149,14 +150,6 @@ public function query(string $domain, string $email, bool $tryMx = true): array
}
}
}

if ($tryMx && ($dns = dns_get_record($domain, DNS_MX))) {
$domain = $dns[0]['target'];
if (!($provider = $this->query($domain, $email, false))) {
[, $domain] = explode('.', $domain, 2);
$provider = $this->query($domain, $email, false);
}
}
return $provider;
}
}
Loading