• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zopefoundation / Zope / 6224812692

18 Sep 2023 03:28PM CUT coverage: 81.131% (+0.008%) from 81.123%
6224812692

push

github

mauritsvanrees
Allow only some image types to be displayed inline.

Force download for others, especially SVG images.  By default we use a list of allowed types.
You can switch a to a list of denied types by setting OS environment variable
``OFS_IMAGE_USE_DENYLIST=1``.  This change only affects direct URL access.
``<img src="image.svg" />`` works the same as before.

See security advisory:
https://github.com/zopefoundation/Zope/security/advisories/GHSA-wm8q-9975-xh5v

4332 of 7070 branches covered (0.0%)

Branch coverage included in aggregate %.

35 of 35 new or added lines in 2 files covered. (100.0%)

27197 of 31792 relevant lines covered (85.55%)

0.86 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/App/class_init.py
1
##############################################################################
2
#
3
# Copyright (c) 2002 Zope Foundation and Contributors.
4
#
5
# This software is subject to the provisions of the Zope Public License,
6
# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
7
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
8
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
9
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
10
# FOR A PARTICULAR PURPOSE.
11
#
12
##############################################################################
13
"""Class initialization.
×
14
"""
15

16
from zope.deferredimport import deprecated
×
17

18

19
# BBB Zope 5.0
20
deprecated(
×
21
    'Please import from AccessControl.Permission.',
22
    ApplicationDefaultPermissions=(
23
        'AccessControl.Permission:ApplicationDefaultPermissions'),
24
)
25

26
deprecated(
×
27
    'Please import from AccessControl.class_init.',
28
    default__class_init__='AccessControl.class_init:InitializeClass',
29
    InitializeClass='AccessControl.class_init:InitializeClass',
30
)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc