Compare commits
No commits in common. "5f2f19519fe4f321e0a3fb351ec5643408237cef" and "e7c8b62ffd69ece107526976bdd0f553ba8b2d9f" have entirely different histories.
5f2f19519f
...
e7c8b62ffd
2 changed files with 4 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
<div id='footer'>
|
<div id='footer'>
|
||||||
Note that Curious Greg uses a cookie to store your login state. Deleting the cookie used by Curious Greg will log you out of your account. Posting will still function as normal.<br />
|
Note that Curious Greg uses a cookie to store your login state. Deleting the cookie used by Curious Greg will log you out of your account. Posting will still function as normal.<br />
|
||||||
Created by <a target="_blank" href='https://fedi.lynnesbian.space/@lynnesbian'>@lynnesbian@fedi.lynnesbian.space</a> (message her about any bugs you find). Source code is available <a target="_blank" href='https://git.lynnesbian.space/lynnesbian/curious-greg'>here</a>, under the <a target="_blank" href='https://www.mozilla.org/en-US/MPL/2.0/'>Mozilla Public License Version 2.0</a>.<br />
|
Created by <a target="_blank" href='https://fedi.lynnesbian.space/@lynnesbian'>@lynnesbian@fedi.lynnesbian.space</a> (message her about any bugs you find). Source code is available <a target="_blank" href='https://git.lynnesbian.space/curious-greg'>here</a>, under the <a target="_blank" href='https://www.mozilla.org/en-US/MPL/2.0/'>Mozilla Public License Version 2.0</a>.<br />
|
||||||
Curious Greg is currently in beta. Bugs may be present. There is <strong>no risk</strong> of Curious Greg deleting any of your posts.
|
Curious Greg is currently in beta. Bugs may be present. There is <strong>no risk</strong> of Curious Greg deleting any of your posts.
|
||||||
</div>
|
</div>
|
8
web.py
8
web.py
|
@ -56,12 +56,10 @@ def main():
|
||||||
def home():
|
def home():
|
||||||
if 'acct' in session:
|
if 'acct' in session:
|
||||||
dc.execute("SELECT * FROM data WHERE username = %s AND instance = %s", (session['username'], session['instance']))
|
dc.execute("SELECT * FROM data WHERE username = %s AND instance = %s", (session['username'], session['instance']))
|
||||||
|
#TODO: if this fails, redirect to /logout
|
||||||
data = dc.fetchone()
|
data = dc.fetchone()
|
||||||
try:
|
for item in ['username', 'instance', 'avi', 'secret', 'client_id', 'client_secret', 'cc', 'ccavi']:
|
||||||
for item in ['username', 'instance', 'avi', 'secret', 'client_id', 'client_secret', 'cc', 'ccavi']:
|
session[item] = data[item]
|
||||||
session[item] = data[item]
|
|
||||||
except:
|
|
||||||
return redirect('/logout') #TODO: not good UX
|
|
||||||
|
|
||||||
if 'cc' not in session:
|
if 'cc' not in session:
|
||||||
session['cc'] = "None"
|
session['cc'] = "None"
|
||||||
|
|
Loading…
Reference in a new issue