mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-20 02:06:42 -06:00
Fix #3228 - Send full path info instead of just path info and urlencode said path info
This commit is contained in:
parent
1e1aba73ef
commit
7d053f8ba4
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
|
* [#3228](https://github.com/digitalocean/netbox/issues/3228) - Fixed login link retaining query parameters
|
||||||
* [#3031](https://github.com/digitalocean/netbox/issues/3031) - Fixed form field population of tags with spaces
|
* [#3031](https://github.com/digitalocean/netbox/issues/3031) - Fixed form field population of tags with spaces
|
||||||
* [#3132](https://github.com/digitalocean/netbox/issues/3132) - Circuit termination missing from available cable termination types
|
* [#3132](https://github.com/digitalocean/netbox/issues/3132) - Circuit termination missing from available cable termination types
|
||||||
* [#3150](https://github.com/digitalocean/netbox/issues/3150) - Fix formatting of cable length during cable trace
|
* [#3150](https://github.com/digitalocean/netbox/issues/3150) - Fix formatting of cable length during cable trace
|
||||||
|
@ -2,6 +2,7 @@ from django.conf import settings
|
|||||||
from django.db import ProgrammingError
|
from django.db import ProgrammingError
|
||||||
from django.http import Http404, HttpResponseRedirect
|
from django.http import Http404, HttpResponseRedirect
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
import urllib
|
||||||
|
|
||||||
from .views import server_error
|
from .views import server_error
|
||||||
|
|
||||||
@ -22,7 +23,7 @@ class LoginRequiredMiddleware(object):
|
|||||||
# performs its own authentication.
|
# performs its own authentication.
|
||||||
api_path = reverse('api-root')
|
api_path = reverse('api-root')
|
||||||
if not request.path_info.startswith(api_path) and request.path_info != settings.LOGIN_URL:
|
if not request.path_info.startswith(api_path) and request.path_info != settings.LOGIN_URL:
|
||||||
return HttpResponseRedirect('{}?next={}'.format(settings.LOGIN_URL, request.path_info))
|
return HttpResponseRedirect('{}?next={}'.format(settings.LOGIN_URL, urllib.parse.quote(request.get_full_path_info()))
|
||||||
return self.get_response(request)
|
return self.get_response(request)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user