Skip to content

Commit d8a5d31

Browse files
Merge pull request #53393 from nextcloud/dependabot/composer/vendor-bin/openapi-extractor/nextcloud/openapi-extractor-1.8.0
2 parents 0678095 + 96d423c commit d8a5d31

File tree

16 files changed

+46
-46
lines changed

16 files changed

+46
-46
lines changed

apps/files_sharing/lib/Controller/PublicPreviewController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function getPreview(
107107
$downloadForbidden = $attributes?->getAttribute('permissions', 'download') === false;
108108
// Is this header is set it means our UI is doing a preview for no-download shares
109109
// we check a header so we at least prevent people from using the link directly (obfuscation)
110-
$isPublicPreview = $this->request->getHeader('X-NC-Preview') === 'true';
110+
$isPublicPreview = $this->request->getHeader('x-nc-preview') === 'true';
111111

112112
if ($isPublicPreview && $downloadForbidden) {
113113
// Only cache for 15 minutes on public preview requests to quickly remove from cache

apps/files_sharing/openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@
14921492
}
14931493
},
14941494
{
1495-
"name": "X-NC-Preview",
1495+
"name": "x-nc-preview",
14961496
"in": "header",
14971497
"schema": {
14981498
"type": "string"

apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function testShareNoDownloadButPreviewHeader() {
144144
->willReturn($attributes);
145145

146146
$this->request->method('getHeader')
147-
->with('X-NC-Preview')
147+
->with('x-nc-preview')
148148
->willReturn('true');
149149

150150
$file = $this->createMock(File::class);
@@ -184,7 +184,7 @@ public function testShareWithAttributes() {
184184
->willReturn($attributes);
185185

186186
$this->request->method('getHeader')
187-
->with('X-NC-Preview')
187+
->with('x-nc-preview')
188188
->willReturn('true');
189189

190190
$file = $this->createMock(File::class);

apps/webhook_listeners/lib/Controller/WebhooksController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function create(
137137
): DataResponse {
138138
$appId = null;
139139
if ($this->session->get('app_api') === true) {
140-
$appId = $this->request->getHeader('EX-APP-ID');
140+
$appId = $this->request->getHeader('ex-app-id');
141141
}
142142
try {
143143
$authMethod = AuthMethod::from($authMethod ?? AuthMethod::None->value);
@@ -206,7 +206,7 @@ public function update(
206206
): DataResponse {
207207
$appId = null;
208208
if ($this->session->get('app_api') === true) {
209-
$appId = $this->request->getHeader('EX-APP-ID');
209+
$appId = $this->request->getHeader('ex-app-id');
210210
}
211211
try {
212212
$authMethod = AuthMethod::from($authMethod ?? AuthMethod::None->value);
@@ -271,7 +271,7 @@ public function destroy(int $id): DataResponse {
271271
/**
272272
* Remove all existing webhook registration mapped to an AppAPI app id
273273
*
274-
* @param string $appid id of the app, as in the EX-APP-ID for creation
274+
* @param string $appid id of the app, as in the ex-app-id for creation
275275
*
276276
* @return DataResponse<Http::STATUS_OK, int, array{}>
277277
*

apps/webhook_listeners/openapi.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256
},
257257
"parameters": [
258258
{
259-
"name": "EX-APP-ID",
259+
"name": "ex-app-id",
260260
"in": "header",
261261
"schema": {
262262
"type": "string"
@@ -556,7 +556,7 @@
556556
}
557557
},
558558
{
559-
"name": "EX-APP-ID",
559+
"name": "ex-app-id",
560560
"in": "header",
561561
"schema": {
562562
"type": "string"
@@ -809,7 +809,7 @@
809809
{
810810
"name": "appid",
811811
"in": "path",
812-
"description": "id of the app, as in the EX-APP-ID for creation",
812+
"description": "id of the app, as in the ex-app-id for creation",
813813
"required": true,
814814
"schema": {
815815
"type": "string"

core/Controller/AppPasswordController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function getAppPassword(): DataResponse {
7777
$password = null;
7878
}
7979

80-
$userAgent = $this->request->getHeader('USER_AGENT');
80+
$userAgent = $this->request->getHeader('user-agent');
8181

8282
$token = $this->random->generate(72, ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
8383

core/Controller/ClientFlowLoginController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function __construct(
6565
}
6666

6767
private function getClientName(): string {
68-
$userAgent = $this->request->getHeader('USER_AGENT');
68+
$userAgent = $this->request->getHeader('user-agent');
6969
return $userAgent !== '' ? $userAgent : 'unknown';
7070
}
7171

core/Controller/ClientFlowLoginV2Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ private function handleFlowDone(bool $result): StandaloneTemplateResponse {
293293
#[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)]
294294
public function init(): JSONResponse {
295295
// Get client user agent
296-
$userAgent = $this->request->getHeader('USER_AGENT');
296+
$userAgent = $this->request->getHeader('user-agent');
297297

298298
$tokens = $this->loginFlowV2Service->createTokens($userAgent);
299299

core/Controller/PreviewController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ private function fetchPreview(
152152

153153
// Is this header is set it means our UI is doing a preview for no-download shares
154154
// we check a header so we at least prevent people from using the link directly (obfuscation)
155-
$isNextcloudPreview = $this->request->getHeader('X-NC-Preview') === 'true';
155+
$isNextcloudPreview = $this->request->getHeader('x-nc-preview') === 'true';
156156
$storage = $node->getStorage();
157157
if ($isNextcloudPreview === false && $storage->instanceOfStorage(ISharedStorage::class)) {
158158
/** @var ISharedStorage $storage */

core/openapi-full.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@
11731173
],
11741174
"parameters": [
11751175
{
1176-
"name": "USER_AGENT",
1176+
"name": "user-agent",
11771177
"in": "header",
11781178
"schema": {
11791179
"type": "string"
@@ -8066,7 +8066,7 @@
80668066
],
80678067
"parameters": [
80688068
{
8069-
"name": "USER_AGENT",
8069+
"name": "user-agent",
80708070
"in": "header",
80718071
"schema": {
80728072
"type": "string"

0 commit comments

Comments
 (0)