How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- Send requests to provisioning API, see cURL requests below
Expected behaviour
Valid XML
Actual behaviour
Broken XML
The API is using the userId as name of the XML-element. This is breaking for obvious reasons.
Suggested fix
- Do not use userId as element name. use
<user> instead. The element already contains an <id> element.
Downside: Breaking change plus it's no longer possible to access users directly in JSON (via data.users.admin)
Server configuration
Nextcloud version: reproducible on any supported version
Where did you install Nextcloud from: git
API Response:
curl -H "OCS-APIRequest: true" http://admin:admin@nextcloud.local/ocs/v1.php/cloud/users/details
<?xml version="1.0"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message>OK</message>
<totalitems></totalitems>
<itemsperpage></itemsperpage>
</meta>
<data>
<users>
<admin>
<enabled>1</enabled>
<storageLocation>/usr/local/apache2/htdocs/public/nextcloud/data/admin</storageLocation>
<id>admin</id>
<lastLogin>1588766990000</lastLogin>
<backend>Database</backend>
<subadmin/>
<quota>
<free>51709734912</free>
<used>164</used>
<total>51709735076</total>
<relative>0</relative>
<quota>-3</quota>
</quota>
<email/>
<displayname>admin</displayname>
<phone></phone>
<address></address>
<website></website>
<twitter></twitter>
<groups>
<element>admin</element>
</groups>
<language>en_GB</language>
<locale></locale>
<backendCapabilities>
<setDisplayName>1</setDisplayName>
<setPassword>1</setPassword>
</backendCapabilities>
</admin>
<enabled>1</enabled>
<storageLocation>/usr/local/apache2/htdocs/public/nextcloud/data/user@example.com</storageLocation>
<id>user@example.com</id>
<lastLogin>0</lastLogin>
<backend>Database</backend>
<subadmin/>
<quota>
<quota>none</quota>
<used>0</used>
</quota>
<email/>
<displayname>User with at sign</displayname>
<phone></phone>
<address></address>
<website></website>
<twitter></twitter>
<groups/>
<language>en</language>
<locale></locale>
<backendCapabilities>
<setDisplayName>1</setDisplayName>
<setPassword>1</setPassword>
</backendCapabilities>
</users>
</data>
</ocs>
How to use GitHub
Steps to reproduce
Expected behaviour
Valid XML
Actual behaviour
Broken XML
The API is using the userId as name of the XML-element. This is breaking for obvious reasons.
Suggested fix
<user>instead. The element already contains an<id>element.Downside: Breaking change plus it's no longer possible to access users directly in JSON (via
data.users.admin)Server configuration
Nextcloud version: reproducible on any supported version
Where did you install Nextcloud from: git
API Response:
curl -H "OCS-APIRequest: true" http://admin:admin@nextcloud.local/ocs/v1.php/cloud/users/details