Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
2b1f7da6
Commit
2b1f7da6
authored
Aug 28, 2015
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
S3 credentials for backup should not be displayed in the control panel, fixes #529
parent
ef1779ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
backup.py
management/backup.py
+8
-1
daemon.py
management/daemon.py
+1
-1
No files found.
management/backup.py
View file @
2b1f7da6
...
...
@@ -386,7 +386,7 @@ def backup_set_custom(env, target, target_user, target_pass, min_age):
return
"Updated backup config"
def
get_backup_config
(
env
,
for_save
=
False
):
def
get_backup_config
(
env
,
for_save
=
False
,
for_ui
=
False
):
backup_root
=
os
.
path
.
join
(
env
[
"STORAGE_ROOT"
],
'backup'
)
# Defaults.
...
...
@@ -407,6 +407,13 @@ def get_backup_config(env, for_save=False):
if
for_save
:
return
config
# When passing this back to the admin to show the current settings, do not include
# authentication details. The user will have to re-enter it.
if
for_ui
:
for
field
in
(
"target_user"
,
"target_pass"
):
if
field
in
config
:
del
config
[
field
]
# helper fields for the admin
config
[
"file_target_directory"
]
=
os
.
path
.
join
(
backup_root
,
'encrypted'
)
config
[
"enc_pw_file"
]
=
os
.
path
.
join
(
backup_root
,
'secret_key.txt'
)
...
...
management/daemon.py
View file @
2b1f7da6
...
...
@@ -413,7 +413,7 @@ def backup_status():
@
authorized_personnel_only
def
backup_get_custom
():
from
backup
import
get_backup_config
return
json_response
(
get_backup_config
(
env
))
return
json_response
(
get_backup_config
(
env
,
for_ui
=
True
))
@
app
.
route
(
'/system/backup/config'
,
methods
=
[
"POST"
])
@
authorized_personnel_only
...
...
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