Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
go
Commits
aa42adb0
Commit
aa42adb0
authored
Apr 19, 2017
by
David Haynes
🙆
Browse files
Merge branch '76-delete-lnk-csrf' into '2.2-dev'
Resolve "CSRF and CSRF-Like Protection" See merge request
!86
parents
ea1a281e
ad20a50c
Pipeline
#1259
passed with stage
in 1 minute and 29 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
go/go/views.py
View file @
aa42adb0
...
...
@@ -329,7 +329,7 @@ def delete(request, short):
url
=
get_object_or_404
(
URL
,
short__iexact
=
short
)
# If the RegisteredUser is the owner of the URL
if
url
.
owner
==
request
.
user
.
registereduser
:
if
url
.
owner
==
request
.
user
.
registereduser
and
request
.
META
[
'HTTP_REFERER'
]
==
request
.
META
[
'HTTP_HOST'
]
:
# remove the URL
url
.
delete
()
# redirect to my_links
...
...
requirements/base.txt
View file @
aa42adb0
Django>=1.11
django-crispy-forms==1.6.
0
django-crispy-forms==1.6.
1
django-ratelimit==1.0.1
django-redis-cache==1.6.4
git+https://github.com/dhaynespls/django-qrcode.git
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment