mirror of https://github.com/jumpserver/jumpserver
fix: 命令存储 es 类型主机带用户名密码报错
parent
501ad698b7
commit
e599bca951
|
@ -157,7 +157,7 @@ def command_storage_es_host_format_validator(host):
|
|||
raise serializers.ValidationError(default_error_msg)
|
||||
if ':' not in h.netloc:
|
||||
raise serializers.ValidationError(default_error_msg)
|
||||
_host, _port = h.netloc.split(':')
|
||||
_host, _port = h.netloc.rsplit(':', maxsplit=1)
|
||||
if not _host:
|
||||
error_msg = _('Host invalid')
|
||||
raise serializers.ValidationError(error_msg)
|
||||
|
|
Loading…
Reference in New Issue