mirror of
https://github.com/goharbor/harbor.git
synced 2024-10-31 23:59:32 +01:00
Fix ca bundle path join issue
CA bundle name start with '/' will break the os path join Signed-off-by: DQ <dengq@vmware.com>
This commit is contained in:
parent
045e400547
commit
3aedae86b2
@ -53,7 +53,10 @@ def validate(conf: dict, **kwargs):
|
||||
# ca_bundle validate
|
||||
if conf.get('registry_custom_ca_bundle_path'):
|
||||
registry_custom_ca_bundle_path = conf.get('registry_custom_ca_bundle_path') or ''
|
||||
ca_bundle_host_path = os.path.join(host_root_dir, registry_custom_ca_bundle_path)
|
||||
if registry_custom_ca_bundle_path.startswith('/data/'):
|
||||
ca_bundle_host_path = registry_custom_ca_bundle_path
|
||||
else:
|
||||
ca_bundle_host_path = os.path.join(host_root_dir, registry_custom_ca_bundle_path.lstrip('/'))
|
||||
try:
|
||||
uid = os.stat(ca_bundle_host_path).st_uid
|
||||
st_mode = os.stat(ca_bundle_host_path).st_mode
|
||||
|
Loading…
Reference in New Issue
Block a user