Просмотр исходного кода

Fixes #7282: Fix KeyError exception when INSECURE_SKIP_TLS_VERIFY is true

jeremystretch 4 лет назад
Родитель
Сommit
b0abfee35b
2 измененных файлов с 3 добавлено и 1 удалено
  1. 2 1
      docs/release-notes/version-3.0.md
  2. 1 0
      netbox/netbox/settings.py

+ 2 - 1
docs/release-notes/version-3.0.md

@@ -17,8 +17,9 @@
 * [#7167](https://github.com/netbox-community/netbox/issues/7167) - Ensure consistent font size when using monospace formatting
 * [#7226](https://github.com/netbox-community/netbox/issues/7226) - Exempt GraphQL API requests from CSRF inspection
 * [#7248](https://github.com/netbox-community/netbox/issues/7248) - Fix global search results section links
-* [#7279](https://github.com/netbox-community/netbox/issues/7279) - Fix exception when tracing cable with no associated path
 * [#7266](https://github.com/netbox-community/netbox/issues/7266) - Tweak font color for form field placeholder text
+* [#7279](https://github.com/netbox-community/netbox/issues/7279) - Fix exception when tracing cable with no associated path
+* [#7282](https://github.com/netbox-community/netbox/issues/7282) - Fix KeyError exception when `INSECURE_SKIP_TLS_VERIFY` is true
 
 ---
 

+ 1 - 0
netbox/netbox/settings.py

@@ -262,6 +262,7 @@ if CACHING_REDIS_SENTINELS:
     CACHES['default']['OPTIONS']['CLIENT_CLASS'] = 'django_redis.client.SentinelClient'
     CACHES['default']['OPTIONS']['SENTINELS'] = CACHING_REDIS_SENTINELS
 if CACHING_REDIS_SKIP_TLS_VERIFY:
+    CACHES['default']['OPTIONS'].setdefault('CONNECTION_POOL_KWARGS', {})
     CACHES['default']['OPTIONS']['CONNECTION_POOL_KWARGS']['ssl_cert_reqs'] = False