liquid_feedback_frontend
changeset 1595:ec0d69b4bb20
Return 404 for invalid areas
author | bsw |
---|---|
date | Sun Jan 31 20:34:37 2021 +0100 (2021-01-31) |
parents | c061fea7ed10 |
children | 9f55297a1a6a |
files | app/main/index/index.lua |
line diff
1.1 --- a/app/main/index/index.lua Sun Jan 31 19:52:31 2021 +0100 1.2 +++ b/app/main/index/index.lua Sun Jan 31 20:34:37 2021 +0100 1.3 @@ -28,6 +28,11 @@ 1.4 1.5 if area_id then 1.6 area = Area:by_id(area_id) 1.7 + if not area or area.unit_id ~= unit.id then 1.8 + execute.view { module = "index", view = "404" } 1.9 + request.set_status("404 Not Found") 1.10 + return 1.11 + end 1.12 end 1.13 1.14 ui.grid{ content = function()