瀏覽代碼

Encode string before hashing

version-14
Aditya Hase 7 年之前
父節點
當前提交
1d53cd89bf
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      frappe/model/document.py

+ 1
- 1
frappe/model/document.py 查看文件

@@ -1004,7 +1004,7 @@ class Document(BaseDocument):

def get_signature(self):
"""Returns signature (hash) for private URL."""
return hashlib.sha224(get_datetime_str(self.creation)).hexdigest()
return hashlib.sha224(get_datetime_str(self.creation).encode()).hexdigest()

def get_liked_by(self):
liked_by = getattr(self, "_liked_by", None)


Loading…
取消
儲存