Compare commits

..

No commits in common. "5f2f19519fe4f321e0a3fb351ec5643408237cef" and "e7c8b62ffd69ece107526976bdd0f553ba8b2d9f" have entirely different histories.

2 changed files with 4 additions and 6 deletions

View file

@ -1,5 +1,5 @@
<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 />
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.
</div>

4
web.py
View file

@ -56,12 +56,10 @@ def main():
def home():
if 'acct' in session:
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()
try:
for item in ['username', 'instance', 'avi', 'secret', 'client_id', 'client_secret', 'cc', 'ccavi']:
session[item] = data[item]
except:
return redirect('/logout') #TODO: not good UX
if 'cc' not in session:
session['cc'] = "None"