Skip to content
Merged
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
5 changes: 5 additions & 0 deletions lib/Controller/RemoteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,13 @@ public function memberships(string $circleId): DataResponse {
* @throws MalformedArrayException
* @throws SignatoryException
* @throws SignatureException
* @throws UnknownInterfaceException
*/
private function extractEventFromRequest(): FederatedEvent {
// will throw exception if instance is not configured for this event.
$this->interfaceService->setCurrentInterfaceFromRequest($this->request);
$this->interfaceService->getCurrentInterface();

$signed = $this->remoteStreamService->incomingSignedRequest();
$this->confirmRemoteInstance($signed);

Expand Down
3 changes: 3 additions & 0 deletions lib/Service/RemoteStreamService.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
use OCA\Circles\Tools\Traits\TNCWellKnown;
use OCA\Circles\Tools\Traits\TStringTools;
use OCP\AppFramework\Http;
use OCP\IConfig;
use OCP\IURLGenerator;
use ReflectionClass;
use ReflectionException;
Expand Down Expand Up @@ -83,6 +84,7 @@ class RemoteStreamService extends NCSignature {
* @param ConfigService $configService
*/
public function __construct(
private readonly IConfig $config,
IURLGenerator $urlGenerator,
RemoteRequest $remoteRequest,
InterfaceService $interfaceService,
Expand Down Expand Up @@ -364,6 +366,7 @@ public function retrieveSignatory(string $keyId, bool $refresh = true): NCSignat
$request = new NCRequest();
$this->configService->configureRequest($request);

$request->setLocalAddressAllowed($this->config->getSystemValueBool('allow_local_remote_servers'));
$this->downloadSignatory($remoteInstance, $keyId, ['auth' => $confirm], $request);
$remoteInstance->setUidFromKey();

Expand Down
Loading