[FIX] web: never cache the CSRF token
"website.layout" inherit of "portal.frontend_layout" which inherit of "web.layout" which contains the creation of the CSRF token. Add because "website.layout" add a t-cache key, the CSRF token is under this cache key. But the CSRF token should be always generated, then add t-nocache on CSRF token t-set. Part-of: odoo/odoo#95755
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<link type="image/x-icon" rel="shortcut icon" t-att-href="x_icon or '/web/static/img/favicon.ico'"/>
|
||||
<script id="web.layout.odooscript" type="text/javascript">
|
||||
var odoo = {
|
||||
csrf_token: "<t t-esc="request.csrf_token(None)"/>",
|
||||
csrf_token: "<t t-nocache="The csrf token must always be up to date." t-esc="request.csrf_token(None)"/>",
|
||||
debug: "<t t-esc="debug"/>",
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user