mirror of https://github.com/jumpserver/jumpserver
fix(crypto): 有时解密失败 (#5003)
* fix(nodes): 节点默认按 value 排序 * fix(crypto): 有时解密失败 Co-authored-by: xinwen <coderWen@126.com>pull/5010/head
parent
18d8f59bb5
commit
9af4d5f76f
|
@ -407,7 +407,7 @@ class Node(OrgModelMixin, SomeNodesMixin, FamilyMixin, NodeAssetsMixin):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = _("Node")
|
verbose_name = _("Node")
|
||||||
ordering = ['key']
|
ordering = ['value']
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.full_value
|
return self.full_value
|
||||||
|
|
|
@ -189,7 +189,7 @@ class Crypto:
|
||||||
if origin_text:
|
if origin_text:
|
||||||
# 有时不同算法解密不报错,但是返回空字符串
|
# 有时不同算法解密不报错,但是返回空字符串
|
||||||
return origin_text
|
return origin_text
|
||||||
except (TypeError, ValueError, UnicodeDecodeError):
|
except (TypeError, ValueError, UnicodeDecodeError, IndexError):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue