Skip to content

Commit 243ca24

Browse files
sushiwushimart-e
authored andcommitted
[FIX] website_slides: allow to use only in POST
This method only expects to be called as POST and should not be called with GET. This commit enforces that. closes odoo#71554 X-original-commit: d8c1d9f Signed-off-by: Martin Trigaux (mat) <[email protected]>
1 parent b657fbd commit 243ca24

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

addons/website_slides/controllers/mail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def portal_chatter_post(self, res_model, res_id, message, **kw):
2727
@http.route([
2828
'/slides/mail/update_comment',
2929
'/mail/chatter_update',
30-
], type='http', auth="user")
30+
], type='http', auth="user", methods=['POST'])
3131
def mail_update_message(self, res_model, res_id, message, message_id, redirect=None, attachment_ids='', attachment_tokens='', **post):
3232
# keep this mechanism intern to slide currently (saas 12.5) as it is
3333
# considered experimental

addons/website_slides/controllers/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ def slide_category_search_read(self, fields, domain):
991991
'can_create': can_create,
992992
}
993993

994-
@http.route('/slides/category/add', type="http", website=True, auth="user")
994+
@http.route('/slides/category/add', type="http", website=True, auth="user", methods=['POST'])
995995
def slide_category_add(self, channel_id, name):
996996
""" Adds a category to the specified channel. Slide is added at the end
997997
of slide list based on sequence. """

0 commit comments

Comments
 (0)