Merge lp:~mardy/account-plugins/nextcloud-auth-1651938 into lp:account-plugins

Proposed by Alberto Mardegan
Status: Merged
Approved by: David Barth
Approved revision: 184
Merged at revision: 184
Proposed branch: lp:~mardy/account-plugins/nextcloud-auth-1651938
Merge into: lp:account-plugins
Diff against target: 23 lines (+2/-0)
2 files modified
qml/nextcloud/NewAccount.qml (+1/-0)
qml/owncloud/NewAccount.qml (+1/-0)
To merge this branch: bzr merge lp:~mardy/account-plugins/nextcloud-auth-1651938
Reviewer Review Type Date Requested Status
Online Accounts Pending
Review via email: mp+319788@code.launchpad.net

Commit message

NextCloud/OwnCloud: fix account creation on newer releases

A special header must be provided in order to avoid failing the CSRF check.

Description of the change

NextCloud/OwnCloud: fix account creation on newer releases

A special header must be provided in order to avoid failing the CSRF check.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/nextcloud/NewAccount.qml'
2--- qml/nextcloud/NewAccount.qml 2016-11-10 08:50:04 +0000
3+++ qml/nextcloud/NewAccount.qml 2017-03-14 10:27:58 +0000
4@@ -202,6 +202,7 @@
5 }
6 request.open("POST", host + "/ocs/v1.php/person/check", true);
7 request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
8+ request.setRequestHeader("OCS-APIRequest", "true");
9 var body = "login=" + encodeURIComponent(username) + "&password=" + encodeURIComponent(password)
10 request.send(body);
11 }
12
13=== modified file 'qml/owncloud/NewAccount.qml'
14--- qml/owncloud/NewAccount.qml 2016-09-23 06:53:54 +0000
15+++ qml/owncloud/NewAccount.qml 2017-03-14 10:27:58 +0000
16@@ -202,6 +202,7 @@
17 }
18 request.open("POST", host + "/ocs/v1.php/person/check", true);
19 request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
20+ request.setRequestHeader("OCS-APIRequest", "true");
21 var body = "login=" + encodeURIComponent(username) + "&password=" + encodeURIComponent(password)
22 request.send(body);
23 }

Subscribers

People subscribed via source and target branches