Skip to content

Commit da675ae

Browse files
fw-botmart-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. [CLA] Signature for sushiwushi closes odoo#71574 X-original-commit: 00f2eee Signed-off-by: Martin Trigaux (mat) <[email protected]>
1 parent b9b1383 commit da675ae

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

addons/website_slides/controllers/mail.py

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

addons/website_slides/controllers/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ def slide_category_search_read(self, fields, domain):
10321032
'can_create': can_create,
10331033
}
10341034

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

doc/cla/individual/sushiwushi.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Malaysia, 2021-06-01
2+
3+
I hereby agree to the terms of the Odoo Individual Contributor License
4+
Agreement v1.0.
5+
6+
I declare that I am authorized and able to make this agreement and sign this
7+
declaration.
8+
9+
Signed,
10+
11+
iamsushi [email protected] https://github.com/sushiwushi

0 commit comments

Comments
 (0)