diff --git a/files/__main__.py b/files/__main__.py index c3155ba79..0d0bc4d28 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -32,7 +32,7 @@ app.config["SERVER_NAME"] = environ.get("DOMAIN").strip() app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 86400 app.config["SESSION_COOKIE_NAME"] = "session_" + environ.get("SITE_NAME").strip().lower() app.config["VERSION"] = "1.0.0" -app.config['MAX_CONTENT_LENGTH'] = 99 * 1024 * 1024 +app.config['MAX_CONTENT_LENGTH'] = 8 * 1024 * 1024 app.config["SESSION_COOKIE_SECURE"] = True app.config["SESSION_COOKIE_SAMESITE"] = "Lax" app.config["PERMANENT_SESSION_LIFETIME"] = 60 * 60 * 24 * 365 diff --git a/files/assets/css/main.css b/files/assets/css/main.css index 860534d25..246e7fda0 100644 --- a/files/assets/css/main.css +++ b/files/assets/css/main.css @@ -4639,7 +4639,8 @@ lite-youtube { background-size: cover; cursor: pointer; max-width: 720px; - margin-bottom: 1.3rem !important + margin-bottom: 1.3rem !important; + margin: auto } lite-youtube::before { diff --git a/files/routes/settings.py b/files/routes/settings.py index d3445f07f..38b563a9b 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -43,9 +43,9 @@ def removebackground(v): @limiter.limit("1/second;30/minute;200/hour;1000/day") @auth_required def settings_profile_post(v): - # if v and v.patron: - # if request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB."}, 413 - # elif request.content_length > 4 * 1024 * 1024: return {"error":"Max file size is 4 MB."}, 413 + if v and v.patron: + if request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB."}, 413 + elif request.content_length > 4 * 1024 * 1024: return {"error":"Max file size is 4 MB."}, 413 updated = False @@ -537,7 +537,7 @@ def settings_security_post(v): if new_email == v.email: return render_template("settings_security.html", v=v, error="That email is already yours!") - url = f"{SITE_FULL}/activate" + url = f"{request.host_url}activate" now = int(time.time()) diff --git a/files/templates/authforms.html b/files/templates/authforms.html index 8b786e2fe..4c2486145 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -15,7 +15,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/default.html b/files/templates/default.html index 282354c21..cf162fe4d 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -7,7 +7,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/log.html b/files/templates/log.html index 8894abc71..f2d1e7d97 100644 --- a/files/templates/log.html +++ b/files/templates/log.html @@ -6,7 +6,7 @@ {% block content %} {% if v %} - + {% if v.agendaposter %} - + {% endif %}