Skip to content

Commit dd5a1e7

Browse files
committed
fix(dav): respect storage scheme when discovering token endpoint
exchangeRefreshToken hardcoded https:// for OCM discovery, breaking federated shares against http remotes (e.g. integration test setup). Use $this->secure to pick the scheme. Signed-off-by: Micke Nordin <kano@sunet.se>
1 parent 77f208f commit dd5a1e7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/private/Files/Storage/DAV.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ protected function init(): void {
265265
*/
266266
protected function exchangeRefreshToken(): string {
267267
try {
268-
$host = 'https://' . $this->host;
268+
$host = ($this->secure ? 'https://' : 'http://') . $this->host;
269269
$ocmProvider = $this->discoveryService->discover($host);
270270
$tokenEndpoint = $ocmProvider->getTokenEndPoint();
271271

0 commit comments

Comments
 (0)