Skip to content

Commit 179d774

Browse files
Added content from suggestions
Signed-off-by: Christian Wolf <github@christianwolf.email>
1 parent 66d1f61 commit 179d774

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

developer_manual/basics/controllers.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,9 @@ developers can implement their own types of menu renderings by adding a custom
439439
class implementing the ``OCP\\AppFramework\\Http\\Template\\IMenuAction`` interface.
440440

441441
As the public template is also some HTML template, the same argumentation as for :ref:`regular templates<controller_template>` regarding the CSRF checks hold true:
442-
The usage of ``#[NoCSRFRequired]`` for public pages is considered acceptable and is actually needed to visit the page without an active account.
442+
The usage of ``#[NoCSRFRequired]`` for public pages is considered acceptable for some pages:
443+
Each page that the user should be able to directly access (by typing/pastig the URL in the browser or clicking on a link in a mail) should have this attribute set.
444+
For multi-page forms in the second and later stages, this should **not** be set as the user should follow the series of pages.
443445

444446
Data-based responses
445447
--------------------

developer_manual/digging_deeper/rest_apis.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ There are different ways a clients might interact with your APIs.
117117
These ways depend on your API configuration (what you allow) and on which route the request is finally made.
118118

119119
- *Access from web frontend* means the user is accessing the Nextcloud web frontend with a web browser.
120-
- *Access from non-browser* is if the user accesses the resource or page using something that is not a web browser, like an Android app or a curl command.```
120+
- *Access from non-browser* is if the user accesses the resource or page using something that is not a web browser, like an Android app or a curl command.
121121
- *Access from external website* means that the user browses some third party web site and data from your Nextcloud server appears.
122122
The other website has to embed/load/use images, JSON data, or other resources from a URL pointing to the Nextcloud server, to be able to do this.
123123

developer_manual/prologue/security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ If you are using the App Framework, every controller method is automatically che
233233

234234
Additionally, it is advised to carefully select the HTTP method used for requests.
235235
Requests of type ``GET`` should not alter data but just read existing data.
236-
As long as no other attack is involved, any non-``GET`` request requires at least user interaction (transmitting a form).
236+
This way, at least no typed (or copied) URL might alter data (e.g. clicking a link from a spam mail message by accident).
237237

238238
Unvalidated redirects
239239
---------------------

0 commit comments

Comments
 (0)