diff --git a/app.py b/app.py
index fa2a1b1..ccb1102 100644
--- a/app.py
+++ b/app.py
@@ -47,6 +47,8 @@ async def clear_session(request, exception):
@app.before_server_start
async def main_start(*_):
print(">>>>>> main_start <<<<<<")
+
+ app.config.REQUEST_MAX_SIZE = 1024 * 1024 * 5 # 5 MB
app.ctx.om = OrderManager()
if FILL_CACHE:
diff --git a/propic.py b/propic.py
index 7eef9b4..907caa9 100644
--- a/propic.py
+++ b/propic.py
@@ -45,6 +45,8 @@ async def upload_propic(request, order: Order):
try:
img = Image.open(BytesIO(body[0].body))
+ if(img.size[0] > 2048 or img.size[1] > 2048):
+ raise exceptions.BadRequest("Maximum allowed dimensions: 2048x2048")
with open(f"res/propic/{fn}_{order.code}_original", "wb") as f:
f.write(body[0].body)
diff --git a/stats.py b/stats.py
index 75d7467..d9759c1 100644
--- a/stats.py
+++ b/stats.py
@@ -7,7 +7,7 @@ bp = Blueprint("stats", url_prefix="/manage")
@bp.route("/sponsorcount")
async def sponsor_count(request, order: Order):
await request.app.ctx.om.updateCache()
- orders = {key:value for key,value in sorted(request.app.ctx.om.cache.items(), key=lambda x: len(x[1].room_members), reverse=True) if value.status not in ['c', 'e']}
+ orders = {key:value for key,value in sorted(request.app.ctx.om.cache.items(), key=lambda x: x[1].ans('fursona_name')) if value.status not in ['c', 'e']}
tpl = request.app.ctx.tpl.get_template('sponsorcount.html')
return html(tpl.render(orders=orders, order=order))
@@ -23,7 +23,7 @@ async def nose_count(request, order: Order):
@bp.route("/fursuitcount")
async def fursuit_count(request, order: Order):
await request.app.ctx.om.updateCache()
- orders = {key:value for key,value in sorted(request.app.ctx.om.cache.items(), key=lambda x: len(x[1].room_members), reverse=True) if value.status not in ['c', 'e']}
+ orders = {key:value for key,value in sorted(request.app.ctx.om.cache.items(), key=lambda x: x[1].ans('fursona_name')) if value.status not in ['c', 'e']}
tpl = request.app.ctx.tpl.get_template('fursuitcount.html')
return html(tpl.render(orders=orders, order=order))
\ No newline at end of file
diff --git a/tpl/blocks/room.html b/tpl/blocks/room.html
index 8de7962..4425c1f 100644
--- a/tpl/blocks/room.html
+++ b/tpl/blocks/room.html
@@ -2,7 +2,7 @@
Room's type: {{ROOM_TYPE_NAMES[order.bed_in_room]}}.
-Note! Only people with the same room type can be roommates. If you need help, you can check the support guide clicking here.
+Note! Only people with the same room type can be roommates. If you need help, contact the Furizon's Staff.
{# Show alert if room owner has wrong people inside #}