Skip to content

Commit 83bb6eb

Browse files
committed
Fix broken access control in Kiosk Manager API endpoints
Add AdminRoleAuthMiddleware to the /kiosks API route group to restrict access to admin users only. This fixes a broken access control vulnerability where any authenticated user could: - Allow kiosk registrations (/api/kiosks/allowRegistration) - Accept kiosk devices (/api/kiosks/{id}/acceptKiosk) - Reload kiosk devices (/api/kiosks/{id}/reloadKiosk) - Identify kiosk devices (/api/kiosks/{id}/identifyKiosk) - Set kiosk assignments (/api/kiosks/{id}/setAssignment) These operations are now properly restricted to administrators only.
1 parent 218cede commit 83bb6eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/api/routes/kiosks.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use ChurchCRM\dto\SystemConfig;
44
use ChurchCRM\model\ChurchCRM\KioskDeviceQuery;
5+
use ChurchCRM\Slim\Middleware\Request\Auth\AdminRoleAuthMiddleware;
56
use ChurchCRM\Slim\SlimUtils;
67
use ChurchCRM\Utils\LoggerUtils;
78
use Propel\Runtime\ActiveQuery\Criteria;
@@ -79,4 +80,4 @@
7980

8081
return SlimUtils::renderSuccessJSON($response);
8182
});
82-
});
83+
})->add(AdminRoleAuthMiddleware::class);

0 commit comments

Comments
 (0)