diff options
| author | Christophe Simonis <chs@odoo.com> | 2015-08-11 15:03:41 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2015-10-01 01:36:50 +0200 |
| commit | 7636b510a2cfc48bd0281374596f3c7caf1f7edf (patch) | |
| tree | ec6e2fd9ae83aa15f61f7db620c980c80197813d /addons/website/static/src/xml/website.gallery.xml | |
| parent | 058b33544ff5c89891cddf3b2060ab046a98d3f6 (diff) | |
[ADD] *: CSRF protection in forms and routes
* make CSRF protection the default on all non-SAFE methods
note: there currently is no way to call a CSRF-protected endpoint
without a form-encoded entity-body as that's the only place we get the
CSRF token from.
* simple CSRF token generation: just use the HMAC'd session id, no
generating a new random token per session then HMAC it
* use constant-time equal function to avoid timing attacks
* assert that a database secret is configured before hashing/validating
the CSRF token
* opt-out database manager from CSRF: The super-admin password serves
the purpose of a CSRF token in the database manager screens.
There is no request database to obtain the
secret and generate a CSRF token.
Diffstat (limited to 'addons/website/static/src/xml/website.gallery.xml')
| -rw-r--r-- | addons/website/static/src/xml/website.gallery.xml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/website/static/src/xml/website.gallery.xml b/addons/website/static/src/xml/website.gallery.xml index 21fe07dca4a..caf3f4e620b 100644 --- a/addons/website/static/src/xml/website.gallery.xml +++ b/addons/website/static/src/xml/website.gallery.xml @@ -19,6 +19,7 @@ </div> <div class="modal-body"> <form action="/web_editor/attachment/add" method="post" enctype="multipart/form-data" > + <input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/> <div class="form-group"> <input name="upload" type="file" value="Choose images" multiple="multiple" accept="image/*"/> </div> |
