Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
21
Issues
21
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
go
Commits
aa42adb0
Commit
aa42adb0
authored
Apr 19, 2017
by
David Haynes
🙆
Browse files
Options
Browse Files
Download
Plain Diff
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
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
go/go/views.py
go/go/views.py
+1
-1
requirements/base.txt
requirements/base.txt
+1
-1
No files found.
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