Verify label is UTF-8 data
This commit is contained in:
parent
2293f52380
commit
204f1fe52c
|
@ -3798,6 +3798,10 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
|
||||||
if len(params) == 2:
|
if len(params) == 2:
|
||||||
address, label = params
|
address, label = params
|
||||||
label = label.decode('base64')
|
label = label.decode('base64')
|
||||||
|
try:
|
||||||
|
label.decode('utf-8')
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
return 'API Error 0017: Label is not valid UTF-8 data.'
|
||||||
if len(params) >2:
|
if len(params) >2:
|
||||||
return 'API Error 0000: I need either 1 or 2 parameters!'
|
return 'API Error 0000: I need either 1 or 2 parameters!'
|
||||||
address = addBMIfNotPresent(address)
|
address = addBMIfNotPresent(address)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user