Module: check_mk
Branch: master
Commit: 1ad4056fafd26f9d7016186354e76bc186b39271
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1ad4056fafd26f…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Mon May 14 09:32:37 2018 +0200
Use hashlib for the row IDs of views
Change-Id: Icc195103f2ef5269e7a733cd538c8e8c57e65753
---
web/htdocs/views.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index c57568e..65e1b75 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -26,6 +26,7 @@
import utils
import config, time, os, re, pprint
+import hashlib
import weblib, traceback, forms, valuespec, inventory, visuals, metrics
import sites
import bi
@@ -2886,7 +2887,7 @@ def row_id(view, row):
key = ''
for col in multisite_datasources[view['datasource']]['idkeys']:
key += '~%s' % row[col]
- return str(hash(key))
+ return hashlib.sha256(key).hexdigest()
def paint_stalified(row, text):
if is_stale(row):