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
=== modified file 'qml/nextcloud/NewAccount.qml'
--- qml/nextcloud/NewAccount.qml 2016-11-10 08:50:04 +0000
+++ qml/nextcloud/NewAccount.qml 2017-03-14 10:27:58 +0000
@@ -202,6 +202,7 @@
202 }202 }
203 request.open("POST", host + "/ocs/v1.php/person/check", true);203 request.open("POST", host + "/ocs/v1.php/person/check", true);
204 request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");204 request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
205 request.setRequestHeader("OCS-APIRequest", "true");
205 var body = "login=" + encodeURIComponent(username) + "&password=" + encodeURIComponent(password)206 var body = "login=" + encodeURIComponent(username) + "&password=" + encodeURIComponent(password)
206 request.send(body);207 request.send(body);
207 }208 }
208209
=== modified file 'qml/owncloud/NewAccount.qml'
--- qml/owncloud/NewAccount.qml 2016-09-23 06:53:54 +0000
+++ qml/owncloud/NewAccount.qml 2017-03-14 10:27:58 +0000
@@ -202,6 +202,7 @@
202 }202 }
203 request.open("POST", host + "/ocs/v1.php/person/check", true);203 request.open("POST", host + "/ocs/v1.php/person/check", true);
204 request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");204 request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
205 request.setRequestHeader("OCS-APIRequest", "true");
205 var body = "login=" + encodeURIComponent(username) + "&password=" + encodeURIComponent(password)206 var body = "login=" + encodeURIComponent(username) + "&password=" + encodeURIComponent(password)
206 request.send(body);207 request.send(body);
207 }208 }

Subscribers

People subscribed via source and target branches