Skip to content

Commit

Permalink
WEB-4143 : Fix a CSRF bug in section files (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
boulch committed Sep 13, 2024
1 parent 69e1d41 commit 47392fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Changelog
1.2.70 (unreleased)
-------------------

- WEB-4143 : Fix a CSRF bug in section files
[boulch]

- WEB-4144 : Set requests timeout to 12 when we populate RemoteContacts vocabulary
[remdub]

Expand Down
3 changes: 3 additions & 0 deletions src/imio/smartweb/core/contents/sections/files/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
from imio.smartweb.core.utils import batch_results
from imio.smartweb.core.utils import get_scale_url
from plone import api
from plone.protect.interfaces import IDisableCSRFProtection
from zope.component import queryMultiAdapter
from zope.interface import alsoProvides


class FilesView(CarouselOrTableSectionView):
"""Files Section view"""

def items(self):
alsoProvides(self.request, IDisableCSRFProtection)
orientation = self.context.orientation
image_scale = self.image_scale
items = super(FilesView, self).items()
Expand Down

0 comments on commit 47392fd

Please sign in to comment.