Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
postgres-operator
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
zalando
postgres-operator
Commits
1111964f
Commit
1111964f
authored
8 years ago
by
Murat Kabilov
Browse files
Options
Downloads
Patches
Plain Diff
fix password check in pguserpassword
remove magic number
parent
009db16c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/util/util.go
+1
-1
1 addition, 1 deletion
pkg/util/util.go
with
1 addition
and
1 deletion
pkg/util/util.go
+
1
−
1
View file @
1111964f
...
...
@@ -41,7 +41,7 @@ func NameFromMeta(meta v1.ObjectMeta) spec.NamespacedName {
}
func
PGUserPassword
(
user
spec
.
PgUser
)
string
{
if
(
len
(
user
.
Password
)
==
md5
.
Size
&&
user
.
Password
[
:
3
]
==
md5prefix
)
||
user
.
Password
==
""
{
if
(
len
(
user
.
Password
)
==
md5
.
Size
*
2
+
len
(
md5prefix
)
&&
user
.
Password
[
:
3
]
==
md5prefix
)
||
user
.
Password
==
""
{
// Avoid processing already encrypted or empty passwords
return
user
.
Password
}
...
...
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