From 933deb10d62d50cd19f9c7e910ef515a9cda319b Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 5 Aug 2021 16:41:32 +0200 Subject: [PATCH] fggfgf --- docker-compose.yml | 8 ++++---- files/__main__.py | 4 ++-- files/classes/submission.py | 2 +- files/classes/user.py | 2 +- files/helpers/images.py | 2 +- files/helpers/sanitize.py | 2 +- files/mail/mail.py | 2 +- files/routes/admin.py | 2 +- files/routes/comments.py | 2 +- files/routes/discord.py | 2 +- files/routes/posts.py | 2 +- files/routes/settings.py | 4 ++-- files/routes/static.py | 2 +- files/routes/users.py | 2 +- 14 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index c98050634..ae466bd6b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ services: - DATABASE_URL=postgresql://postgres@postgres:5432/postgres - DATABASE_CONNECTION_POOL_URL=postgresql://postgres@postgres:5432/postgres - MASTER_KEY=${MASTER_KEY:-KTVciAUQFpFh2WdJ/oiHJlxl6FvzRZp8kYzAAv3l2OA=} - - domain=localhost + - DOMAIN=localhost - SITE_NAME=Drama - CLOUDFLARE_ZONE=vcxvdfgfc6r554etrgd - CLOUDFLARE_KEY=vcxvdfgfc6r554etrgd @@ -24,11 +24,11 @@ services: - DISCORD_CLIENT_ID=vcxvdfgfc6r554etrgd - DISCORD_CLIENT_SECRET=vcxvdfgfc6r554etrgd - DISCORD_BOT_TOKEN=vcxvdfgfc6r554etrgd - - imgurkey=vcxvdfgfc6r554etrgd + - IMGUR_KEY=vcxvdfgfc6r554etrgd - FACEBOOK_TOKEN=vcxvdfgfc6r554etrgd #- HCAPTCHA_SITEKEY=vcxvdfgfc6r554etrgd - HCAPTCHA_SECRET=vcxvdfgfc6r554etrgd - - youtubekey=vcxvdfgfc6r554etrgd + - YOUTUBE_KEY=vcxvdfgfc6r554etrgd - PUSHER_KEY=vcxvdfgfc6r554etrgd - SPAM_SIMILARITY_THRESHOLD=0.5 - SPAM_SIMILAR_COUNT_THRESHOLD=5 @@ -37,7 +37,7 @@ services: - COMMENT_SPAM_COUNT_THRESHOLD=5 - READ_ONLY=0 - BOT_DISABLE=0 - - coins_name=Dramacoins + - COINS_NAME=Dramacoins links: - "redis" - "postgres" diff --git a/files/__main__.py b/files/__main__.py index 1b0e738cc..eb3386420 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -31,12 +31,12 @@ app.wsgi_app = ProxyFix(app.wsgi_app, x_for=3) app.url_map.strict_slashes = False app.config["SITE_NAME"]=environ.get("SITE_NAME").strip() -app.config["coins_name"]=environ.get("coins_name").strip() +app.config["coins_name"]=environ.get("COINS_NAME").strip() app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.config['DATABASE_URL'] = environ.get("DATABASE_CONNECTION_POOL_URL",environ.get("DATABASE_URL")) app.config['SECRET_KEY'] = environ.get('MASTER_KEY') -app.config["SERVER_NAME"] = environ.get("domain").strip() +app.config["SERVER_NAME"] = environ.get("DOMAIN").strip() app.config["SESSION_COOKIE_NAME"] = "session_" + environ.get("SITE_NAME").strip().lower() app.config["VERSION"] = "1.0.0" diff --git a/files/classes/submission.py b/files/classes/submission.py index 9b47918eb..511214c8c 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -9,7 +9,7 @@ from .mix_ins import * from .flags import * from os import environ -site = environ.get("domain").strip() +site = environ.get("DOMAIN").strip() class SubmissionAux(Base): diff --git a/files/classes/user.py b/files/classes/user.py index 71b6e4985..7f0516b70 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -14,7 +14,7 @@ from .clients import * from files.__main__ import Base, cache from files.helpers.security import * -site = environ.get("domain").strip() +site = environ.get("DOMAIN").strip() class User(Base, Stndrd, Age_times): __tablename__ = "users" diff --git a/files/helpers/images.py b/files/helpers/images.py index 235704a92..e68265d65 100644 --- a/files/helpers/images.py +++ b/files/helpers/images.py @@ -6,7 +6,7 @@ from files.classes.images import * CF_KEY = environ.get("CLOUDFLARE_KEY").strip() CF_ZONE = environ.get("CLOUDFLARE_ZONE").strip() -imgurkey = environ.get("imgurkey").strip() +imgurkey = environ.get("IMGUR_KEY").strip() def upload_file(file=None, resize=False, png=False): diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 1966396ce..72afa6b01 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -6,7 +6,7 @@ from functools import partial from .get import * from os import path -site = environ.get("domain").strip() +site = environ.get("DOMAIN").strip() _allowed_tags = tags = ['b', 'blockquote', diff --git a/files/mail/mail.py b/files/mail/mail.py index b4f0e1f0d..34953ae76 100644 --- a/files/mail/mail.py +++ b/files/mail/mail.py @@ -9,7 +9,7 @@ from files.helpers.wrappers import * from files.classes import * from files.__main__ import app -site = environ.get("domain").strip() +site = environ.get("DOMAIN").strip() name = environ.get("SITE_NAME").strip() mailgun_domain = environ.get("MAILGUN_DOMAIN").strip() diff --git a/files/routes/admin.py b/files/routes/admin.py index cc62d3f30..1d657296f 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -931,7 +931,7 @@ def admin_banned_domains(v): @validate_formkey def admin_toggle_ban_domain(v): - domain=request.form.get("domain").strip() + domain=request.form.get("DOMAIN").strip() if not domain: abort(400) reason=request.form.get("reason", "").strip() diff --git a/files/routes/comments.py b/files/routes/comments.py index 6e6f2c2d6..c59db6044 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -10,7 +10,7 @@ from pusher_push_notifications import PushNotifications from flask import * from files.__main__ import app, limiter -site = environ.get("domain").strip() +site = environ.get("DOMAIN").strip() choices = ['Wow, you must be a JP fan.', 'This is one of the worst posts I have EVER seen. Delete it.', "No, don't reply like this, please do another wall of unhinged rant please.", '# 😴😴😴', "Ma'am we've been over this before. You need to stop.", "I've known more coherent downies.", "Your pulitzer's in the mail", "That's great and all, but I asked for my burger without cheese.", 'That degree finally paying off', "That's nice sweaty. Why don't you have a seat in the time out corner with Pizzashill until you calm down, then you can have your Capri Sun.", "All them words won't bring your pa back.", "You had a chance to not be completely worthless, but it looks like you threw it away. At least you're consistent.", 'Some people are able to display their intelligence by going on at length on a subject and never actually saying anything. This ability is most common in trades such as politics, public relations, and law. You have impressed me by being able to best them all, while still coming off as an absolute idiot.', "You can type 10,000 characters and you decided that these were the one's that you wanted.", 'Have you owned the libs yet?', "I don't know what you said, because I've seen another human naked.", 'Impressive. Normally people with such severe developmental disabilities struggle to write much more than a sentence or two. He really has exceded our expectations for the writing portion. Sadly the coherency of his writing, along with his abilities in the social skills and reading portions, are far behind his peers with similar disabilities.', "This is a really long way of saying you don't fuck.", "Sorry ma'am, looks like his delusions have gotten worse. We'll have to admit him,", '![](https://i.kym-cdn.com/photos/images/newsfeed/001/038/094/0a1.jpg)', 'If only you could put that energy into your relationships', 'Posts like this is why I do Heroine.', 'still unemployed then?', 'K', 'look im gunna have 2 ask u 2 keep ur giant dumps in the toilet not in my replys 😷😷😷', "Mommy is soooo proud of you, sweaty. Let's put this sperg out up on the fridge with all your other failures.", "Good job bobby, here's a star", "That was a mistake. You're about to find out the hard way why.", 'You sat down and wrote all this shit. You could have done so many other things with your life. What happened to your life that made you decide writing novels of bullshit on reddit was the best option?', "I don't have enough spoons to read this shit", "All those words won't bring daddy back.", 'OUT!', "Mommy is soooo proud of you, sweaty. Let's put this sperg out up on the fridge with all your other failures."] diff --git a/files/routes/discord.py b/files/routes/discord.py index 182777e66..3e2f0582d 100644 --- a/files/routes/discord.py +++ b/files/routes/discord.py @@ -7,7 +7,7 @@ SERVER_ID = environ.get("DISCORD_SERVER_ID",'').strip() CLIENT_ID = environ.get("DISCORD_CLIENT_ID",'').strip() CLIENT_SECRET = environ.get("DISCORD_CLIENT_SECRET",'').strip() BOT_TOKEN = environ.get("DISCORD_BOT_TOKEN").strip() -coins_name = environ.get("coins_name").strip() +coins_name = environ.get("COINS_NAME").strip() DISCORD_ENDPOINT = "https://discordapp.com/api/v6" WELCOME_CHANNEL="846509313941700618" diff --git a/files/routes/posts.py b/files/routes/posts.py index fbda0b97e..a4f633a6e 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -18,7 +18,7 @@ from files.__main__ import app, limiter, cache from PIL import Image as PILimage from .front import frontlist -site = environ.get("domain").strip() +site = environ.get("DOMAIN").strip() with open("snappy.txt", "r") as f: snappyquotes = f.read().split("{[para]}") diff --git a/files/routes/settings.py b/files/routes/settings.py index a6453286e..8fbf9127d 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -13,8 +13,8 @@ valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$") valid_title_regex = re.compile("^((?!<).){3,100}$") valid_password_regex = re.compile("^.{8,100}$") -youtubekey = environ.get("youtubekey").strip() -coins_name = environ.get("coins_name").strip() +youtubekey = environ.get("YOUTUBE_KEY").strip() +coins_name = environ.get("COINS_NAME").strip() @app.post("/settings/profile") @auth_required diff --git a/files/routes/static.py b/files/routes/static.py index 978cc2c9e..bf1c99925 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -2,7 +2,7 @@ from files.mail import * from files.__main__ import app, limiter from files.helpers.alerts import * -site = environ.get("domain").strip() +site = environ.get("DOMAIN").strip() @app.get("/patrons") @auth_desired diff --git a/files/routes/users.py b/files/routes/users.py index a42b216c5..c769554c8 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -11,7 +11,7 @@ from flask import * from files.__main__ import app, limiter from pusher_push_notifications import PushNotifications -site = environ.get("domain").strip() +site = environ.get("DOMAIN").strip() PUSHER_KEY = environ.get("PUSHER_KEY", "").strip()