diff --git a/docker-compose.yml b/docker-compose.yml index ea4bf5ac3..b3f3c15b2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,9 +20,6 @@ services: - CLOUDFLARE_ZONE=vcxvdfgfc6r554etrgd - CLOUDFLARE_KEY=vcxvdfgfc6r554etrgd - TENOR_KEY=vcxvdfgfc6r554etrgd - - S3_BUCKET_NAME=i.ruqqus.ga - - AWS_ACCESS_KEY_ID=vcxvdfgfc6r554etrgd - - AWS_SECRET_ACCESS_KEY=vcxvdfgfc6r554etrgd - MAILGUN_KEY=vcxvdfgfc6r554etrgd - admin_email=drama@rdrama.net - FORCE_HTTPS=0 diff --git a/drama/__main__.py b/drama/__main__.py index b390c20bb..3f23779a5 100644 --- a/drama/__main__.py +++ b/drama/__main__.py @@ -97,8 +97,6 @@ app.config["CACHE_REDIS_URL"] = environ.get( app.config["CACHE_DEFAULT_TIMEOUT"] = 60 app.config["CACHE_KEY_PREFIX"] = "flask_caching_" -app.config["S3_BUCKET"]=environ.get("S3_BUCKET_NAME","i.rdrama.net").strip() - app.config["REDIS_POOL_SIZE"]=int(environ.get("REDIS_POOL_SIZE", 10)) redispool=ConnectionPool( diff --git a/drama/classes/user.py b/drama/classes/user.py index 1588c113a..5364fd4d2 100644 --- a/drama/classes/user.py +++ b/drama/classes/user.py @@ -3,7 +3,7 @@ from secrets import token_hex import pyotp from drama.helpers.discord import delete_role -from drama.helpers.aws import * +from drama.helpers.images import * from .alts import Alt from .submission import SaveRelationship from .comment import Notification diff --git a/drama/helpers/aws.py b/drama/helpers/images.py similarity index 99% rename from drama/helpers/aws.py rename to drama/helpers/images.py index 06b3eb51f..4a9ee15d5 100644 --- a/drama/helpers/aws.py +++ b/drama/helpers/images.py @@ -175,7 +175,6 @@ def check_csam(post): db.commit() - # nuke aws delete_file(parsed_url.path.lstrip('/')) db.close() return @@ -209,7 +208,6 @@ def check_csam(post): db.commit() - # nuke aws delete_file(parsed_url.path.lstrip('/')) remove(tempname) @@ -276,7 +274,6 @@ def check_csam_url(url, v, delete_content_function): db.commit() - # nuke aws delete_file(parsed_url.path.lstrip('/')) remove(tempname) diff --git a/drama/routes/admin.py b/drama/routes/admin.py index 1b58c8664..5ad74414e 100644 --- a/drama/routes/admin.py +++ b/drama/routes/admin.py @@ -12,7 +12,7 @@ from drama.helpers.sanitize import * from drama.helpers.markdown import * from drama.helpers.security import * from drama.helpers.get import * -from drama.helpers.aws import * +from drama.helpers.imageupload import * from drama.classes import * from drama.classes.domains import reasons as REASONS from flask import * @@ -465,7 +465,7 @@ def admin_domain_domain(domain_name, v): def admin_image_purge(v): url=request.form.get("url") - aws.delete_file(url) + images.delete_file(url) return redirect("/admin/image_purge") diff --git a/drama/routes/comments.py b/drama/routes/comments.py index cb7f93f6d..068a4460e 100644 --- a/drama/routes/comments.py +++ b/drama/routes/comments.py @@ -1,7 +1,7 @@ from drama.helpers.wrappers import * from drama.helpers.filters import * from drama.helpers.alerts import * -from drama.helpers.aws import * +from drama.helpers.images import * from drama.helpers.session import * from drama.classes import * from drama.routes.front import comment_idlist @@ -753,21 +753,6 @@ def edit_comment(cid, v): with CustomRenderer(post_id=c.parent_submission) as renderer: body_md = renderer.render(mistletoe.Document(body)) body_html = sanitize(body_md, linkgen=True) - - # #csam detection - # def del_function(): - # delete_file(name) - # c.is_banned=True - # g.db.add(c) - # g.db.commit() - - # csam_thread=threading.Thread(target=check_csam_url, - # args=(f"https://s3.eu-central-1.amazonaws.com/i.ruqqus.ga/{name}", - # v, - # del_function - # ) - # ) - # csam_thread.start() c.body = body c.body_html = body_html diff --git a/drama/templates/home.html b/drama/templates/home.html index 753b91146..8383c4ea1 100644 --- a/drama/templates/home.html +++ b/drama/templates/home.html @@ -77,17 +77,17 @@
{% if v %} - - - + + + {% else %} - - - + + + {% endif %}
diff --git a/readme.md b/readme.md index 39c4f4f2b..85759a978 100644 --- a/readme.md +++ b/readme.md @@ -24,7 +24,7 @@ docker-compose up 4- That's it! Visit `localhost` in your browser. -5- Optional: to configure the site settings and successsfully integrate it with the external services we use (hcaptcha, cloudflare, aws S3, discord, tenor and mailgun), please edit the variables in the docker-compose.yml file. +5- Optional: to configure the site settings and successsfully integrate it with the external services we use (hcaptcha, cloudflare, discord, tenor and mailgun), please edit the variables in the docker-compose.yml file. --- @@ -51,7 +51,7 @@ source setup 4- That's it. Visit `localhost` in your browser. -5- Optional: to configure the site settings and successsfully integrate it with the external services we use (hcaptcha, cloudflare, aws S3, discord, tenor and mailgun), please run this command and edit the variables: +5- Optional: to configure the site settings and successsfully integrate it with the external services we use (hcaptcha, cloudflare, discord, tenor and mailgun), please run this command and edit the variables: ``` nano /drama/docker-compose.yml