mirror of
https://github.com/xcat2/confluent.git
synced 2025-03-19 01:47:45 +00:00
Protect against binary sealed data
It was detected that binary sealed data could happen. Ensure that it is str before passing to configuration.
This commit is contained in:
parent
affbbcc89b
commit
f584b9bc11
@ -259,6 +259,8 @@ def handle_request(env, start_response):
|
||||
start_response('500 Error', (('Content-Type', 'text/plain'),))
|
||||
yield 'No pending profile detected, unable to accept status update'
|
||||
elif env['PATH_INFO'] == '/self/saveapikey' and reqbody:
|
||||
if not isinstance(reqbody, str):
|
||||
reqbody = reqbody.decode('utf8')
|
||||
cfg.set_node_attributes({
|
||||
nodename: {'deployment.sealedapikey': {'value': reqbody}}})
|
||||
start_response('200 OK', ())
|
||||
|
Loading…
x
Reference in New Issue
Block a user