Skip to content
This repository was archived by the owner on May 9, 2020. It is now read-only.

Commit 30621ed

Browse files
kamilbednarzfpedrini
authored andcommitted
Removed stripping padding chars in decrypted strings
1 parent 347d9ad commit 30621ed

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

chef/encrypted_data_bag_item.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ def to_dict(self):
9393
return result
9494

9595
class Decryptors(object):
96-
STRIP_CHARS = map(chr,range(0,31))
97-
9896
@staticmethod
9997
def create_decryptor(key, data):
10098
version = EncryptedDataBagItem.get_version(data)
@@ -113,8 +111,6 @@ def __init__(self, key, data, iv):
113111
def decrypt(self):
114112
value = self.decryptor.decrypt(self.data)
115113
del self.decryptor
116-
# Strip all the whitespace and sequence control characters
117-
value = value.strip(reduce(lambda x,y: "%s%s" % (x,y), EncryptedDataBagItem.Decryptors.STRIP_CHARS))
118114
# After decryption we should get a string with JSON
119115
try:
120116
value = json.loads(value)

0 commit comments

Comments
 (0)