Merge pull request #1576 from castrapel/issue_1570_ignorecase

force owner into lowercase. Properly decode bytecode private key
This commit is contained in:
Curtis 2018-08-17 11:26:03 -07:00 committed by GitHub
commit c5fb2422da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -60,6 +60,8 @@ class LemurSchema(Schema):
class LemurInputSchema(LemurSchema): class LemurInputSchema(LemurSchema):
@pre_load(pass_many=True) @pre_load(pass_many=True)
def preprocess(self, data, many): def preprocess(self, data, many):
if isinstance(data, dict) and data.get('owner'):
data['owner'] = data['owner'].lower()
return self.under(data, many=many) return self.under(data, many=many)

View File

@ -72,6 +72,8 @@ def upload_cert(name, body, private_key, path, cert_chain=None, **kwargs):
name = name + '-' + path.strip('/') name = name + '-' + path.strip('/')
try: try:
if isinstance(private_key, bytes):
private_key = private_key.decode("utf-8")
if cert_chain: if cert_chain:
return client.upload_server_certificate( return client.upload_server_certificate(
Path=path, Path=path,