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