# HG changeset patch # User bsw # Date 1612121677 -3600 # Node ID ec0d69b4bb20fc98fd50226b80f1238c6e96051a # Parent c061fea7ed10c89c89505109ff9cfe9d8d842bf6 Return 404 for invalid areas diff -r c061fea7ed10 -r ec0d69b4bb20 app/main/index/index.lua --- a/app/main/index/index.lua Sun Jan 31 19:52:31 2021 +0100 +++ b/app/main/index/index.lua Sun Jan 31 20:34:37 2021 +0100 @@ -28,6 +28,11 @@ if area_id then area = Area:by_id(area_id) + if not area or area.unit_id ~= unit.id then + execute.view { module = "index", view = "404" } + request.set_status("404 Not Found") + return + end end ui.grid{ content = function()