Skip to content

Commit

Permalink
Merge pull request #896 from maykinmedia/fix/codescanning-12-redirect
Browse files Browse the repository at this point in the history
Fixed Github codescanning warning 12 for 'URL redirection from remote source'
  • Loading branch information
alextreme authored Dec 12, 2023
2 parents 6155987 + e64bf31 commit 91852a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/open_inwoner/search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from django.utils.translation import gettext as _
from django.views.generic import FormView

from furl import furl

from open_inwoner.configurations.models import SiteConfiguration
from open_inwoner.openzaak.cases import fetch_cases
from open_inwoner.utils.mixins import PaginationMixin
Expand Down Expand Up @@ -153,7 +155,9 @@ def form_valid(self, form):
"Thank you for your feedback. It will help us to improve our search engine"
),
)
return HttpResponseRedirect(http_referer)
redirect = furl(reverse("search:search"))
redirect.args.update(self.request.GET)
return HttpResponseRedirect(redirect.url)

@property
def display_restricted(self):
Expand Down

0 comments on commit 91852a3

Please sign in to comment.