##// END OF EJS Templates
channelstream: use sha256 for history filename hashes
ergo -
r1163:ef1cd4f9 default
parent child Browse files
Show More
@@ -18,16 +18,14 b''
18 # RhodeCode Enterprise Edition, including its added features, Support services,
18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20
20
21 import hashlib
22 import itsdangerous
21 import logging
23 import logging
22 import os
24 import os
23
24 import itsdangerous
25 import requests
25 import requests
26
27 from dogpile.core import ReadWriteMutex
26 from dogpile.core import ReadWriteMutex
28
27
29 import rhodecode.lib.helpers as h
28 import rhodecode.lib.helpers as h
30
31 from rhodecode.lib.auth import HasRepoPermissionAny
29 from rhodecode.lib.auth import HasRepoPermissionAny
32 from rhodecode.lib.ext_json import json
30 from rhodecode.lib.ext_json import json
33 from rhodecode.model.db import User
31 from rhodecode.model.db import User
@@ -169,7 +167,9 b' def parse_channels_info(info_result, inc'
169
167
170
168
171 def log_filepath(history_location, channel_name):
169 def log_filepath(history_location, channel_name):
172 filename = '{}.log'.format(channel_name.encode('hex'))
170 hasher = hashlib.sha256()
171 hasher.update(channel_name.encode('utf8'))
172 filename = '{}.log'.format(hasher.hexdigest())
173 filepath = os.path.join(history_location, filename)
173 filepath = os.path.join(history_location, filename)
174 return filepath
174 return filepath
175
175
General Comments 0
You need to be logged in to leave comments. Login now