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

Fixes #6082: Support colons in webhook header values

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

+ 1 - 0
docs/release-notes/version-2.10.md

@@ -16,6 +16,7 @@
 * [#6070](https://github.com/netbox-community/netbox/issues/6070) - Add missing `count_ipaddresses` attribute to VMInterface serializer
 * [#6073](https://github.com/netbox-community/netbox/issues/6073) - Permit users to manage their own REST API tokens without needing explicit permission
 * [#6081](https://github.com/netbox-community/netbox/issues/6081) - Fix interface connections REST API endpoint
+* [#6082](https://github.com/netbox-community/netbox/issues/6082) - Support colons in webhook header values
 * [#6108](https://github.com/netbox-community/netbox/issues/6108) - Do not infer tenant assignment from parent objects for prefixes, IP addresses
 * [#6117](https://github.com/netbox-community/netbox/issues/6117) - Handle exception when attempting to assign an MPTT-enabled model as its own parent
 * [#6131](https://github.com/netbox-community/netbox/issues/6131) - Correct handling of boolean fields when cloning objects

+ 1 - 1
netbox/extras/models/models.py

@@ -140,7 +140,7 @@ class Webhook(models.Model):
         ret = {}
         data = render_jinja2(self.additional_headers, context)
         for line in data.splitlines():
-            header, value = line.split(':')
+            header, value = line.split(':', 1)
             ret[header.strip()] = value.strip()
         return ret