Commit Graph

10 Commits

Author SHA1 Message Date
dillard a4a8f9a4eb Fix missing admin check on OccController routes (security)
index(), cmd() and list() were accessible to any logged-in user.
The navigation menu already restricts visibility to admins, but the
routes themselves were unprotected — any authenticated user who knows
the URL could execute occ commands or list all available commands.

Fix: inject IGroupManager + IUserSession, add requireAdmin() helper,
call it at the start of all three public methods. Matches the pattern
already used in DbController.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 22:04:05 +02:00
Zeller 44eb700713 fix: adapt breaking changes of OC\Console\Application constructor 2025-04-10 15:08:06 +02:00
Zeller 33613686ea fix: use LoggerInterface instead of deprecated ILogger in OccController 2025-04-10 15:08:06 +02:00
Rahammetoela Toekiman cc591973a4 fix Too few arguments to function OC\Console\Application::__construct(), 5 passed in /var/www/html/custom_apps/occweb/lib/Controller/OccController.php on line 33 and exactly 6 expected
fix #14 #15 #16 #17
2025-01-22 15:13:23 +01:00
Rahammetoela Toekiman 50e2b4bbab fix Call to undefined method OC\Server::getEventDispatcher() 2024-05-15 15:05:25 +02:00
Alexander Rose 4f6ef754e2 use reflection to get the list of commands for tab-completion 2023-08-22 12:22:36 +02:00
Alexander Rose 2a25ca725e send empty array on OccController->list() 2023-08-22 12:22:36 +02:00
Alexander Rose 354086c6db fix application logger 2022-03-08 19:31:00 +01:00
Adphi 4fecde9d9d returns error message on exception 2020-02-02 17:54:29 +01:00
Adphi 411e9e800f fix name cases 2020-02-02 13:15:44 +00:00