Merge pull request #10449 from nextcloud/backport/10435/stable27

[stable27] Add a note about encoding in login flow
This commit is contained in:
Joas Schilling 2023-05-26 11:02:50 +02:00 committed by GitHub
commit 437b74c6d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,9 +48,13 @@ On the final login the server will do a redirect to a url of the following forma
nc://login/server:<server>&user:<loginname>&password:<password>
* server: The address of the server to connect to. The server may specify a protocol (http or https). If no protocol is specified the client will assume https.
* loginname: The username that the client must use to login. **Note:** Keep in mind that this is the loginname and could be different from the username. For example the email address could be used to login but not for generating the webdav URL. You could fetch the actual username from the OCS API endpoint :code:`<server>/ocs/v1.php/cloud/user`.
* password: The password that the client must use to login and store securely
* ``server``: The address of the server to connect to. The server may specify a protocol (http or https). If no protocol is specified the client will assume https.
* ``loginname``: The username that the client must use to login. **Note:** Keep in mind that this is the loginname and could be different from the username. For example the email address could be used to login but not for generating the webdav URL. You could fetch the actual username from the OCS API endpoint ``<server>/ocs/v1.php/cloud/user``.
* ``password``: The password that the client must use to login and store securely
.. note::
``loginname`` and ``password`` are encoded by PHP's `urlencode <https://www.php.net/manual/en/function.urlencode.php>`_, which differs from `RFC 3986 <http://www.faqs.org/rfcs/rfc3986.html>`_. You may need to replace plus signs :code:`'+'` with spaces :code:`' '` before decoding.
This information will be used by the client to create a new account.
After this the webview is destroyed including all the state the webview holds.