Browse Source

Merge pull request #236 from Leptopoda/fix/#235

fix security for loginFlow2
pull/242/head
Kate 2 years ago committed by GitHub
parent
commit
bcd0f6430c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      packages/nextcloud/lib/src/nextcloud.openapi.dart
  2. 2
      packages/nextcloud/lib/src/nextcloud.openapi.json
  3. 2
      specs/core.json

10
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',

2
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",

2
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",

Loading…
Cancel
Save