Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
csbproject
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tatu Nousiainen
csbproject
Commits
01444f7d
Commit
01444f7d
authored
4 years ago
by
chzesa
Browse files
Options
Downloads
Patches
Plain Diff
Handle duplicate username on server side so this contrived vulnerability makes sense
parent
bbf653ef
Branches
master
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
chat/templates/chat/profile.html
+0
-2
0 additions, 2 deletions
chat/templates/chat/profile.html
chat/views.py
+1
-1
1 addition, 1 deletion
chat/views.py
with
1 addition
and
3 deletions
chat/templates/chat/profile.html
+
0
−
2
View file @
01444f7d
...
...
@@ -10,8 +10,6 @@
headers
:
{
from
:
'
{{user}}
'
}
}).
then
(
r
=>
r
.
json
()).
then
(
v
=>
{
v
.
users
.
forEach
(
u
=>
{
if
(
u
==
'
{{user}}
'
)
return
;
let
p
=
document
.
createElement
(
`p`
)
let
e
=
document
.
createElement
(
`a`
);
p
.
appendChild
(
e
)
...
...
This diff is collapsed.
Click to expand it.
chat/views.py
+
1
−
1
View file @
01444f7d
...
...
@@ -17,7 +17,7 @@ def getUsers(request):
return
JsonResponse
()
with
connection
.
cursor
()
as
cursor
:
users
=
cursor
.
execute
(
"
SELECT username FROM auth_user WHERE
id
!=
'
%s
'"
%
(
request
.
GET
.
get
(
'
from
'
)))
users
=
cursor
.
execute
(
"
SELECT username FROM auth_user WHERE
username
!=
'
%s
'"
%
(
request
.
headers
.
get
(
'
from
'
)))
r
=
[]
for
u
in
users
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment