fix: Verify data before parsing
All checks were successful
Build Docker / Build Main Image (push) Successful in 18s
Build Docker / Build SLDs Image (push) Successful in 18s

This commit is contained in:
Nathan Woodburn 2023-11-09 12:17:55 +11:00
parent 8a409334b6
commit d7d8a57e0f
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

14
main.py
View File

@ -89,9 +89,21 @@ def edit():
return resp return resp
data = db.get_website_data_raw(user['domain']) data = db.get_website_data_raw(user['domain'])
html = ""
hns = ""
btc = ""
eth = ""
if 'data' in data:
html = data['data'].encode('utf-8').decode('unicode-escape')
if 'HNS' in data:
hns = data['HNS']
if 'BTC' in data:
btc = data['BTC']
if 'ETH' in data:
eth = data['ETH']
return render_template('edit.html',account=user['email'],account_link="account",data=data['data'],hns=data['HNS'],btc=data['BTC'],eth=data['ETH']) return render_template('edit.html',account=user['email'],account_link="account",data=html,hns=hns,btc=btc,eth=eth)
@app.route('/edit', methods=['POST']) @app.route('/edit', methods=['POST'])