summaryrefslogtreecommitdiff
path: root/src/leap/soledad/__init__.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-05-24 12:59:21 -0300
committerdrebs <drebs@leap.se>2013-05-25 11:20:13 -0300
commitd022428a695ba5c499fcd0c8a9681962c006b8e8 (patch)
tree5d0d3a525f81a39f2982c114b5f048ee2af322d3 /src/leap/soledad/__init__.py
parent8cef16cd458801b1513bbcd6849edc4599204b6f (diff)
Add action validation in server.
* Use routes for validating user actions when interacting with server. * Also add tests for action validation. * Add changes file. * Closes #2356.
Diffstat (limited to 'src/leap/soledad/__init__.py')
-rw-r--r--src/leap/soledad/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leap/soledad/__init__.py b/src/leap/soledad/__init__.py
index 94a21447..c9bf3f76 100644
--- a/src/leap/soledad/__init__.py
+++ b/src/leap/soledad/__init__.py
@@ -71,6 +71,7 @@ Path to the certificate file used to certify the SSL connection between
Soledad client and server.
"""
+SECRETS_DOC_ID_HASH_PREFIX = 'uuid-'
#
# Exceptions
@@ -522,7 +523,10 @@ class Soledad(object):
@return: the hash
@rtype: str
"""
- return sha256('uuid-%s' % self._uuid).hexdigest()
+ return sha256(
+ '%s%s' % (
+ SECRETS_DOC_ID_HASH_PREFIX,
+ self._uuid)).hexdigest()
def _shared_db(self):
"""