Use HTTP POST to retrieve the list of contacts

We do not want to have sensitive information in the URL and
therefore also not in the access log. Thus the GET request is
replaced by a POST request.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pull/3233/head
Christoph Wurst 8 years ago
parent 5c29fb16c0
commit 945420baaf
  1. 2
      core/js/contactsmenu.js
  2. 2
      core/routes.php

@ -476,7 +476,7 @@
_getContacts: function(searchTerm) { _getContacts: function(searchTerm) {
var url = OC.generateUrl('/contactsmenu/contacts'); var url = OC.generateUrl('/contactsmenu/contacts');
return Promise.resolve($.ajax(url, { return Promise.resolve($.ajax(url, {
method: 'GET', method: 'POST',
data: { data: {
filter: searchTerm filter: searchTerm
} }

@ -57,7 +57,7 @@ $application->registerRoutes($this, [
['name' => 'Preview#getPreview', 'url' => '/core/preview.png', 'verb' => 'GET'], ['name' => 'Preview#getPreview', 'url' => '/core/preview.png', 'verb' => 'GET'],
['name' => 'Css#getCss', 'url' => '/css/{appName}/{fileName}', 'verb' => 'GET'], ['name' => 'Css#getCss', 'url' => '/css/{appName}/{fileName}', 'verb' => 'GET'],
['name' => 'Js#getJs', 'url' => '/js/{appName}/{fileName}', 'verb' => 'GET'], ['name' => 'Js#getJs', 'url' => '/js/{appName}/{fileName}', 'verb' => 'GET'],
['name' => 'contactsMenu#index', 'url' => '/contactsmenu/contacts', 'verb' => 'GET'], ['name' => 'contactsMenu#index', 'url' => '/contactsmenu/contacts', 'verb' => 'POST'],
], ],
'ocs' => [ 'ocs' => [
['root' => '/cloud', 'name' => 'OCS#getCapabilities', 'url' => '/capabilities', 'verb' => 'GET'], ['root' => '/cloud', 'name' => 'OCS#getCapabilities', 'url' => '/capabilities', 'verb' => 'GET'],

Loading…
Cancel
Save