Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
nexedi
galene
Commits
965b59c9
Commit
965b59c9
authored
Apr 25, 2020
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change user matching to ignore wildcards on password failure.
parent
2e841c08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
group.go
group.go
+5
-1
No files found.
group.go
View file @
965b59c9
...
@@ -308,7 +308,11 @@ type groupUser struct {
...
@@ -308,7 +308,11 @@ type groupUser struct {
func
matchUser
(
user
,
pass
string
,
users
[]
groupUser
)
(
bool
,
bool
)
{
func
matchUser
(
user
,
pass
string
,
users
[]
groupUser
)
(
bool
,
bool
)
{
for
_
,
u
:=
range
users
{
for
_
,
u
:=
range
users
{
if
u
.
Username
==
""
||
u
.
Username
==
user
{
if
u
.
Username
==
""
{
if
u
.
Password
==
""
||
u
.
Password
==
pass
{
return
true
,
true
}
}
else
if
u
.
Username
==
user
{
return
true
,
(
u
.
Password
==
""
||
u
.
Password
==
pass
)
return
true
,
(
u
.
Password
==
""
||
u
.
Password
==
pass
)
}
}
}
}
...
...
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