Skip to content

Commit 4f15b6d

Browse files
feanilclaude
andcommitted
style: fix E7670 pylint error for SAML_METADATA_URL_ALLOW_PRIVATE_IPS
The setting annotation used setting_name/setting_default which triggers E7670 (setting-boolean-default-value) for boolean defaults. This was fixed on master using toggle_name/toggle_default annotations (which allow boolean values) but was not backported to ulmo. Fixing here alongside the other style issues. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 67ef02d commit 4f15b6d

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

openedx/envs/common.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,16 +1576,19 @@ def _make_locale_paths(settings):
15761576
SOCIAL_AUTH_SAML_SP_PRIVATE_KEY_DICT = {}
15771577
SOCIAL_AUTH_SAML_SP_PUBLIC_CERT_DICT = {}
15781578

1579-
# .. setting_name: SAML_METADATA_URL_ALLOW_PRIVATE_IPS
1580-
# .. setting_default: False
1581-
# .. setting_description: When False (the default), fetching SAML metadata from
1579+
# .. toggle_name: SAML_METADATA_URL_ALLOW_PRIVATE_IPS
1580+
# .. toggle_default: False
1581+
# .. toggle_description: When False (the default), fetching SAML metadata from
15821582
# private IP address ranges (RFC 1918: 10.x, 172.16.x, 192.168.x) is blocked
15831583
# as a defense against SSRF attacks. Set to True only in deployments where the
15841584
# SAML Identity Provider is hosted on the same private network as the Open edX
15851585
# server. Note: loopback (127.x) and link-local (169.254.x) addresses remain
1586-
# blocked regardless of this setting. Operators are also encouraged to enforce
1586+
# blocked regardless of this toggle. Operators are also encouraged to enforce
15871587
# network-level egress filtering as a complementary control, particularly to
15881588
# cover hostname-based URLs that are not subject to IP validation.
1589+
# .. toggle_implementation: DjangoSetting
1590+
# .. toggle_use_cases: open_edx
1591+
# .. toggle_creation_date: 2026-04-24
15891592
SAML_METADATA_URL_ALLOW_PRIVATE_IPS = False
15901593

15911594
########################### django-fernet-fields ###########################

0 commit comments

Comments
 (0)