fixed CC connection process

This commit is contained in:
Lynne Megido 2018-11-12 23:10:32 +10:00
parent 594a078515
commit 0e5604af47
Signed by: lynnesbian
GPG key ID: FB7B970303ACE499
2 changed files with 3 additions and 3 deletions

View file

@ -10,7 +10,7 @@
<div id='question'>
<div id='form-avi' style={{ bg }}></div>
<div id='form-avi-label'>{{ session['cc'] }}</div><br />
<a href='/home'>Continue</a>
<a class='button' href='/home'>Continue</a>
</div>
{% include 'footer.html' %}
</body>

4
web.py
View file

@ -225,12 +225,12 @@ def cc_connect_code():
@app.route('/internal/ccc_c', methods=['POST'])
def ccc_c():
if request.form['challenge'] != session['cctemp']['challenge']:
if int(request.form['challenge']) != session['cctemp']['challenge']:
return redirect('/cc_connect/code?invalid')
for item in ['cc', 'ccavi']:
session[item] = session['cctemp'][item]
c.execute("UPDATE data SET cc = %s, ccavi = %s, latest_post = %s, time_between_checks = %s WHERE username = %s AND instance = %s", (session['cc'], session['ccavi'], session['cctemp']['latest_post'], 1, session['username'], session['instance']))
redirect('/cc_connect/complete')
return redirect('/cc_connect/complete')
@app.route('/cc_connect/complete')
def cc_connect_complete():