Compare commits
2 commits
e7c8b62ffd
...
5f2f19519f
Author | SHA1 | Date | |
---|---|---|---|
5f2f19519f | |||
6c45c47497 |
2 changed files with 6 additions and 4 deletions
|
@ -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/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/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 />
|
||||
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
4
web.py
|
@ -56,10 +56,12 @@ 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"
|
||||
|
|
Loading…
Reference in a new issue