From 7ddcec3a0d4a0a348ace224680c33fabe2798608 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Mon, 12 Apr 2021 12:09:37 -0400 Subject: [PATCH 1/4] Fixes #6082: Support colons in webhook header values --- docs/release-notes/version-2.10.md | 1 + netbox/extras/models/models.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/version-2.10.md b/docs/release-notes/version-2.10.md index 7d99959cc..3434ddd7d 100644 --- a/docs/release-notes/version-2.10.md +++ b/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 diff --git a/netbox/extras/models/models.py b/netbox/extras/models/models.py index 4917a7e44..759d37896 100644 --- a/netbox/extras/models/models.py +++ b/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 From 7c29fb449ea13b9acd83bf2e456d8cdf1d35a147 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Mon, 12 Apr 2021 13:10:33 -0400 Subject: [PATCH 2/4] Release v2.10.9 --- docs/release-notes/version-2.10.md | 2 +- netbox/netbox/settings.py | 2 +- requirements.txt | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/release-notes/version-2.10.md b/docs/release-notes/version-2.10.md index 3434ddd7d..d2ce57484 100644 --- a/docs/release-notes/version-2.10.md +++ b/docs/release-notes/version-2.10.md @@ -1,6 +1,6 @@ # NetBox v2.10 -## v2.10.9 (FUTURE) +## v2.10.9 (2021-04-12) ### Enhancements diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 7fee45850..d647c0a0e 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -16,7 +16,7 @@ from django.core.validators import URLValidator # Environment setup # -VERSION = '2.10.9-dev' +VERSION = '2.10.9' # Hostname HOSTNAME = platform.node() diff --git a/requirements.txt b/requirements.txt index 6c41dcee0..e913a8f81 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -Django==3.1.7 +Django==3.1.8 django-cacheops==5.1 django-cors-headers==3.7.0 django-debug-toolbar==3.2 @@ -6,17 +6,17 @@ django-filter==2.4.0 django-mptt==0.12.0 django-pglocks==1.0.4 django-prometheus==2.1.0 -django-rq==2.4.0 +django-rq==2.4.1 django-tables2==2.3.4 django-taggit==1.3.0 django-timezone-field==4.1.2 djangorestframework==3.12.4 drf-yasg[validation]==1.20.0 -gunicorn==20.0.4 +gunicorn==20.1.0 Jinja2==2.11.3 Markdown==3.3.4 netaddr==0.8.0 -Pillow==8.1.2 +Pillow==8.2.0 psycopg2-binary==2.8.6 pycryptodome==3.10.1 PyYAML==5.4.1 From 99f4b2cf95861b22ce5a690bb20549a6e4f0d232 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Mon, 12 Apr 2021 13:29:37 -0400 Subject: [PATCH 3/4] PRVB --- netbox/netbox/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index d647c0a0e..233ee72c4 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -16,7 +16,7 @@ from django.core.validators import URLValidator # Environment setup # -VERSION = '2.10.9' +VERSION = '2.10.10-dev' # Hostname HOSTNAME = platform.node() From d43d5a6cb6035baaef3141f5a810dea1277cdfbd Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Mon, 12 Apr 2021 13:53:38 -0400 Subject: [PATCH 4/4] Change stale issues management to GitHub Actions --- .github/stale.yml | 30 ------------------------------ .github/workflows/stale.yml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 30 deletions(-) delete mode 100644 .github/stale.yml create mode 100644 .github/workflows/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 92da07e6a..000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,30 +0,0 @@ -# Configuration for Stale (https://github.com/apps/stale) - -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 45 - -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 15 - -# Issues with these labels will never be considered stale -exemptLabels: - - "status: accepted" - - "status: blocked" - - "status: needs milestone" - -# Label to use when marking an issue as stale -staleLabel: "pending closure" - -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. NetBox - is governed by a small group of core maintainers which means not all opened - issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md). - -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: > - This issue has been automatically closed due to lack of activity. In an - effort to reduce noise, please do not comment any further. Note that the - core maintainers may elect to reopen this issue at a later date if deemed - necessary. diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 000000000..1cd85d867 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,34 @@ +name: 'Close stale issues and PRs' +on: + schedule: + - cron: '0 4 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v3 + with: + debug-only: true + close-issue-message: > + This issue has been automatically closed due to lack of activity. In an + effort to reduce noise, please do not comment any further. Note that the + core maintainers may elect to reopen this issue at a later date if deemed + necessary. + close-pr-message: > + This PR has been automatically closed due to lack of activity. + days-before-stale: 45 + days-before-close: 15 + exempt-issue-labels: "status: accepted,status: blocked,status: needs milestone" + remove-stale-when-updated: false + stale-issue-label: 'pending closure' + stale-issue-message: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. NetBox + is governed by a small group of core maintainers which means not all opened + issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md). + stale-pr-label: "pending closure" + stale-pr-message: > + This PR has been automatically marked as stale because it has not had + recent activity. It will be closed automatically if no further action is + taken.