From 16701dfe6c9afedabfac14e9ac9680db812a7e96 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Thu, 6 Apr 2023 19:25:43 +0200 Subject: [PATCH] fix security for loginFlow2 --- packages/nextcloud/lib/src/nextcloud.openapi.dart | 10 ---------- packages/nextcloud/lib/src/nextcloud.openapi.json | 2 ++ specs/core.json | 2 ++ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/packages/nextcloud/lib/src/nextcloud.openapi.dart b/packages/nextcloud/lib/src/nextcloud.openapi.dart index e266e72f..f35846c4 100644 --- a/packages/nextcloud/lib/src/nextcloud.openapi.dart +++ b/packages/nextcloud/lib/src/nextcloud.openapi.dart @@ -244,11 +244,6 @@ class NextcloudCoreClient { 'Accept': 'application/json', }; Uint8List? body; - if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { - headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); - } else { - throw Exception('Missing authentication for basic_auth'); - } final response = await rootClient.doRequest( 'post', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(), @@ -269,11 +264,6 @@ class NextcloudCoreClient { 'Accept': 'application/json', }; Uint8List? body; - if (rootClient.authentications.map((final a) => a.id).contains('basic_auth')) { - headers.addAll(rootClient.authentications.singleWhere((final a) => a.id == 'basic_auth').headers); - } else { - throw Exception('Missing authentication for basic_auth'); - } queryParameters['token'] = token; final response = await rootClient.doRequest( 'post', diff --git a/packages/nextcloud/lib/src/nextcloud.openapi.json b/packages/nextcloud/lib/src/nextcloud.openapi.json index 649a8b69..ae7c2c03 100644 --- a/packages/nextcloud/lib/src/nextcloud.openapi.json +++ b/packages/nextcloud/lib/src/nextcloud.openapi.json @@ -2069,6 +2069,7 @@ "tags": [ "core" ], + "security": [], "responses": { "200": { "description": "Login flow init", @@ -2089,6 +2090,7 @@ "tags": [ "core" ], + "security": [], "parameters": [ { "name": "token", diff --git a/specs/core.json b/specs/core.json index 906bd141..c4e3e878 100644 --- a/specs/core.json +++ b/specs/core.json @@ -1043,6 +1043,7 @@ "tags": [ "core" ], + "security": [], "responses": { "200": { "description": "Login flow init", @@ -1063,6 +1064,7 @@ "tags": [ "core" ], + "security": [], "parameters": [ { "name": "token",