Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] base: serve_fallback infinite redirection
Create an attachment with an URL to a static file that does not exists, e.g. '/web/static/idontexist.png'. Inside your browser try to access that file, open <localhost:8069/web/static/idontexist.png>. The browser fails with a "Too Many Redirections" error. When a path is not found, nor in the static files, nor in the controllers, `_serve_fallback` kicks in and attempt to find a resource outside of the router that matches the URL. In case it finds an attachment with a matching URL, it'll deliver it. In this specific case, it finds our attachment and return a redirection to it's URL, which is the same URL as the request hence it loops back. Don't deliver URL attachments via `_serve_fallback`, only deliver stored files. closes #156251 X-original-commit: d2bea59 Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
- Loading branch information