From 7051ec2618815cfe5cb849131a19e8a2c3483185 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 17 Mar 2022 02:00:02 +0000 Subject: [PATCH 3/5] sneed --- snappy.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/snappy.txt b/snappy.txt index bd6dd86ef9..97be6adaf9 100644 --- a/snappy.txt +++ b/snappy.txt @@ -3509,4 +3509,6 @@ And so i see your beautifull Bimboudders bound there 😳 holy fuck im going maa {[para]} This is more than just a fancy wank, this is basically getting off to the very idea of getting off. Like people that watch sissy hypnosis or whatever, they're masturbating on a meta level that I can't even comprehend. It's like trying to understand an alien mind. {[para]} -fsd \ No newline at end of file +fsd +{[para]} +I recently got a DM telling me one of my posts have been posted on a site called Kiwifarms. I'm scared these people will continue to harass me. Is there anything I can do to stop this, it's depressing to live in a world where sites like this are still allowed to stay up. Maybe I could file some sort of copyright request. \ No newline at end of file From 9592f37756fa810c168e6bffebf7e9d4343d1d8a Mon Sep 17 00:00:00 2001 From: SocietyMoment <101757777+SocietyMoment@users.noreply.github.com> Date: Thu, 17 Mar 2022 03:14:46 -0400 Subject: [PATCH 5/5] Fixed oauth error (#223) --- files/routes/oauth.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/files/routes/oauth.py b/files/routes/oauth.py index 388c392df3..237365a87c 100644 --- a/files/routes/oauth.py +++ b/files/routes/oauth.py @@ -5,6 +5,7 @@ from files.helpers.const import * from files.classes import * from flask import * from files.__main__ import app, limiter +import sqlalchemy.exc @app.get("/authorize") @auth_required @@ -24,11 +25,15 @@ def authorize(v): application = g.db.query(OauthApp).filter_by(client_id=client_id).one_or_none() if not application: return {"oauth_error": "Invalid `client_id`"}, 401 access_token = secrets.token_urlsafe(128)[:128] - new_auth = ClientAuth(oauth_client = application.id, user_id = v.id, access_token=access_token) - g.db.add(new_auth) - - g.db.commit() + try: + new_auth = ClientAuth(oauth_client = application.id, user_id = v.id, access_token=access_token) + g.db.add(new_auth) + g.db.commit() + except sqlalchemy.exc.IntegrityError: + g.db.rollback() + old_auth = g.db.query(ClientAuth).filter_by(oauth_client = application.id, user_id = v.id).one() + access_token = old_auth.access_token return redirect(f"{application.redirect_uri}?token={access_token}")