]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Disable querying API for seeing which authentication methods are supported
authorMarcin Haba <marcin.haba@bacula.pl>
Sat, 11 Mar 2023 20:50:51 +0000 (21:50 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Sat, 11 Mar 2023 21:32:26 +0000 (22:32 +0100)
gui/baculum/protected/Web/Modules/BaculumAPIClient.php

index 61c19cf877f4532715536a6b473eb2e5f648373f..5c5c2e17d79090377d67e97600f2184f9d226184 100644 (file)
@@ -97,8 +97,8 @@ class BaculumAPIClient extends WebModule {
                if (count($host_cfg) > 0 && $host_cfg['auth_type'] === 'basic') {
                        $userpwd = sprintf('%s:%s', $host_cfg['login'], $host_cfg['password']);
                        curl_setopt($ch, CURLOPT_USERPWD, $userpwd);
+                       curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
                }
-               curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
                curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);