Additionnal protection against XSS, the response type defaults to html while it should be JSON. (#6118)

pull/6099/head
Loïc Fortemps 2020-07-14 17:26:57 +02:00 committed by GitHub
parent c161e25372
commit 4f8140cd33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -342,7 +342,7 @@ class UserSettingsController extends AppController
)
);
$result = $this->UserSetting->setSetting($this->Auth->user(), $setting);
return $this->RestResponse->saveSuccessResponse('UserSettings', 'setHomePage', false, $this->response->type(), 'Homepage set to ' . $this->request->data['path']);
return $this->RestResponse->saveSuccessResponse('UserSettings', 'setHomePage', false, 'json', 'Homepage set to ' . $this->request->data['path']);
} else {
$this->layout = false;
}