Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Warden
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pavel Valach
Warden
Commits
ea297208
Commit
ea297208
authored
7 years ago
by
Pavel Kácha
Browse files
Options
Downloads
Patches
Plain Diff
Fixed bug with password in arglist (which curiously sometimes somewhere worked)
parent
5bd8047c
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
warden3/contrib/warden_ra/warden_ra.py
+3
-3
3 additions, 3 deletions
warden3/contrib/warden_ra/warden_ra.py
with
3 additions
and
3 deletions
warden3/contrib/warden_ra/warden_ra.py
+
3
−
3
View file @
ea297208
...
...
@@ -329,17 +329,17 @@ class CertHandler(ObjectBase):
if
self
.
req
.
client
==
"
cert
"
:
# Correctly authenticated by cert, most probably not preactivated with password,
# so generate oneshot password and allow now
password
=
""
.
join
((
random
.
choice
(
string
.
ascii_letters
+
string
.
digits
)
for
dummy
in
range
(
16
)))
password
=
[
""
.
join
((
random
.
choice
(
string
.
ascii_letters
+
string
.
digits
)
for
dummy
in
range
(
16
)))
]
self
.
log
.
debug
(
"
Authorized by X509, enabling cert generation with password %s
"
%
password
)
try
:
client
.
update
(
status
=
"
Issuable
"
,
pwd
=
password
)
client
.
update
(
status
=
"
Issuable
"
,
pwd
=
password
[
0
]
)
self
.
registry
.
save_client
(
client
)
except
ClientDisabledError
as
e
:
raise
self
.
req
.
error
(
message
=
"
Error enabling cert generation
"
,
error
=
403
,
exc
=
sys
.
exc_info
())
if
not
password
:
raise
self
.
req
.
error
(
message
=
"
Missing password and certificate validation failed
"
,
error
=
403
,
name
=
name
,
password
=
password
)
try
:
newcert
=
self
.
registry
.
new_cert
(
client
,
csr_data
,
password
)
newcert
=
self
.
registry
.
new_cert
(
client
,
csr_data
,
password
[
0
]
)
except
Exception
as
e
:
raise
self
.
req
.
error
(
message
=
"
Processing error
"
,
error
=
403
,
exc
=
sys
.
exc_info
())
self
.
log
.
info
(
"
Generated.
"
)
...
...
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