diff --git a/.drone.jsonnet b/.drone.jsonnet index b98a9325224..d0cdb5f5184 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -1,8 +1,16 @@ ## 1. Download/install drone binary: -## curl -L https://github.com/harness/drone-cli/releases/latest/download/drone_linux_amd64.tar.gz | tar zx +## curl -L https://github.com/harness/drone-cli/releases/latest/download/drone_linux_amd64.tar.gz | tar zx ## 2. Adjust the matrix as wished -## 3. Run: ./drone jsonnet --stream --format yml -## 4. Commit the result +## 3. Transform jsonnet to yml: +## ./drone jsonnet --stream --format yml +## 4. Export your drone token and the server: +## export DRONE_SERVER=https://drone.nextcloud.com export DRONE_TOKEN=… +## 5. Sign off the changes: +## ./drone sign nextcloud/spreed --save +## 6. Copy the new signature from .drone.yml to `hmac` field in this file +## 7. Transform jsonnet to yml again (to transfer the signature correctly): +## ./drone jsonnet --stream --format yml +## 8. Commit the result local Pipeline(test_set, database, services) = { kind: "pipeline", @@ -15,7 +23,7 @@ local Pipeline(test_set, database, services) = { environment: { APP_NAME: "spreed", CORE_BRANCH: "stable25", - GUESTS_BRANCH: "master", + GUESTS_BRANCH: "stable-2.5", NOTIFICATIONS_BRANCH: "stable25", DATABASEHOST: database }, @@ -154,6 +162,6 @@ local PipelinePostgreSQL(test_set) = Pipeline( { kind: "signature", - hmac: "84d0676d3e4c9aba8fd34cea87fcad71664bbe2e1a5c5f379bd3e9c0c07f2193" + hmac: "3f632bada9ee7e7b504b4302e1a261856f1720432784f36b911b28302fa54a03" }, ] diff --git a/.drone.yml b/.drone.yml index 4dfdf8d169b..ee9172f7eb0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -24,7 +24,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: sqlite - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-callapi @@ -60,7 +60,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: sqlite - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-chat @@ -96,7 +96,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: sqlite - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-chat-2 @@ -132,7 +132,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: sqlite - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-command @@ -169,7 +169,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: sqlite - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-conversation @@ -206,7 +206,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: sqlite - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-conversation-2 @@ -242,7 +242,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: sqlite - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-federation @@ -278,7 +278,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: sqlite - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-integration @@ -314,7 +314,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: sqlite - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-sharing @@ -350,7 +350,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: sqlite - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-sharing-2 @@ -400,7 +400,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: mysql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-callapi @@ -451,7 +451,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: mysql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-chat @@ -502,7 +502,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: mysql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-chat-2 @@ -553,7 +553,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: mysql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-command @@ -605,7 +605,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: mysql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-conversation @@ -657,7 +657,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: mysql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-conversation-2 @@ -708,7 +708,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: mysql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-federation @@ -759,7 +759,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: mysql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-integration @@ -810,7 +810,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: mysql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-sharing @@ -861,7 +861,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: mysql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-sharing-2 @@ -907,7 +907,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: pgsql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-callapi @@ -952,7 +952,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: pgsql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-chat @@ -997,7 +997,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: pgsql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-chat-2 @@ -1042,7 +1042,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: pgsql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-command @@ -1088,7 +1088,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: pgsql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-conversation @@ -1134,7 +1134,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: pgsql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-conversation-2 @@ -1179,7 +1179,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: pgsql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-federation @@ -1224,7 +1224,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: pgsql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-integration @@ -1269,7 +1269,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: pgsql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-sharing @@ -1314,7 +1314,7 @@ steps: APP_NAME: spreed CORE_BRANCH: stable25 DATABASEHOST: pgsql - GUESTS_BRANCH: master + GUESTS_BRANCH: stable-2.5 NOTIFICATIONS_BRANCH: stable25 image: ghcr.io/nextcloud/continuous-integration-php8.0:latest name: integration-sharing-2 @@ -1325,5 +1325,5 @@ trigger: event: - push --- -hmac: 84d0676d3e4c9aba8fd34cea87fcad71664bbe2e1a5c5f379bd3e9c0c07f2193 +hmac: 3f632bada9ee7e7b504b4302e1a261856f1720432784f36b911b28302fa54a03 kind: signature diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 4814952e4ee..742788c09b8 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -144,7 +144,7 @@ public function showCall(string $token): Response { */ public function authenticatePassword(string $token, string $password = ''): Response { // This is the entry point from the `/call/{token}` URL which is hardcoded in the server. - return $this->index($token, '', $password); + return $this->pageHandler($token, '', $password); } /** @@ -154,7 +154,7 @@ public function authenticatePassword(string $token, string $password = ''): Resp * @return Response */ public function notFound(): Response { - return $this->index(); + return $this->pageHandler(); } /** @@ -164,7 +164,7 @@ public function notFound(): Response { * @return Response */ public function duplicateSession(): Response { - return $this->index(); + return $this->pageHandler(); } /** @@ -173,13 +173,26 @@ public function duplicateSession(): Response { * @UseSession * @BruteForceProtection(action=talkRoomToken) * + * @param string $token + * @param string $callUser + * @return TemplateResponse|RedirectResponse + * @throws HintException + */ + public function index(string $token = '', string $callUser = ''): Response { + if ($callUser !== '') { + $token = ''; + } + return $this->pageHandler($token, $callUser); + } + + /** * @param string $token * @param string $callUser * @param string $password * @return TemplateResponse|RedirectResponse * @throws HintException */ - public function index(string $token = '', string $callUser = '', string $password = ''): Response { + protected function pageHandler(string $token = '', string $callUser = '', string $password = ''): Response { $user = $this->userSession->getUser(); if (!$user instanceof IUser) { return $this->guestEnterRoom($token, $password); diff --git a/tests/integration/run.sh b/tests/integration/run.sh index 95f83f0a40e..2858be23011 100755 --- a/tests/integration/run.sh +++ b/tests/integration/run.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash APP_NAME=spreed -NOTIFICATIONS_BRANCH="master" -GUESTS_BRANCH="master" +NOTIFICATIONS_BRANCH="stable25" +GUESTS_BRANCH="stable-2.5" APP_INTEGRATION_DIR=$PWD ROOT_DIR=${APP_INTEGRATION_DIR}/../../../..