Skip to content

Commit de5be74

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#71575 X-original-commit: 00f2eee Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
1 parent a6d1c3e commit de5be74

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
@@ -1031,7 +1031,7 @@ def slide_category_search_read(self, fields, domain):
10311031
'can_create': can_create,
10321032
}
10331033

1034-
@http.route('/slides/category/add', type="http", website=True, auth="user")
1034+
@http.route('/slides/category/add', type="http", website=True, auth="user", methods=['POST'])
10351035
def slide_category_add(self, channel_id, name):
10361036
""" Adds a category to the specified channel. Slide is added at the end
10371037
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 45194995+sushiwushi@users.noreply.github.com https://github.com/sushiwushi

0 commit comments

Comments
 (0)