Merge branch 'main' into avm99963-monorail
Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266
GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/services/secrets_svc.py b/services/secrets_svc.py
index 7b861ce..dec80da 100644
--- a/services/secrets_svc.py
+++ b/services/secrets_svc.py
@@ -1,7 +1,6 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file or at
-# https://developers.google.com/open-source/licenses/bsd
+# Copyright 2016 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
"""A set of functions that provide persistence for secret keys.
@@ -27,12 +26,11 @@
from __future__ import division
from __future__ import absolute_import
-import logging
+import six
from google.appengine.api import memcache
from google.appengine.ext import ndb
-import settings
from framework import framework_helpers
@@ -73,15 +71,14 @@
def GetXSRFKey():
"""Return a secret key string used to generate XSRF tokens."""
- return GetSecrets().xsrf_key
+ return six.ensure_binary(GetSecrets().xsrf_key)
def GetEmailKey():
"""Return a secret key string used to generate email tokens."""
- return GetSecrets().email_key
+ return six.ensure_binary(GetSecrets().email_key)
def GetPaginationKey():
"""Return a secret key string used to generate pagination tokens."""
- return GetSecrets().pagination_key
-
+ return six.ensure_binary(GetSecrets().pagination_key)