mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-07-22 14:13:06 +00:00
fix(Mastercontainer): remove CSRF-unprotected GET /api/docker/getwatchtower endpoint
The GET /api/docker/getwatchtower route triggered a state-changing action (starting the watchtower container) without CSRF protection. This endpoint is removed since the POST /api/docker/watchtower route already exists and is properly protected by the CSRF Guard middleware. Assisted-by: GitHub Copilot:claude-sonnet-4-6
This commit is contained in:
committed by
GitHub
parent
474197cae6
commit
1fc928eed0
@@ -94,7 +94,6 @@ $app->add(new \AIO\Middleware\AuthMiddleware($container->get(\AIO\Auth\AuthManag
|
||||
|
||||
// API
|
||||
$app->post('/api/docker/watchtower', AIO\Controller\DockerController::class . ':StartWatchtowerContainer');
|
||||
$app->get('/api/docker/getwatchtower', AIO\Controller\DockerController::class . ':StartWatchtowerContainer');
|
||||
$app->post('/api/docker/start', AIO\Controller\DockerController::class . ':StartContainer');
|
||||
$app->post('/api/docker/backup', AIO\Controller\DockerController::class . ':StartBackupContainerBackup');
|
||||
$app->post('/api/docker/backup-check', AIO\Controller\DockerController::class . ':StartBackupContainerCheck');
|
||||
|
||||
@@ -31,7 +31,7 @@ readonly class DockerHubManager {
|
||||
return $cachedVersion;
|
||||
}
|
||||
|
||||
// If one of the links below should ever become outdated, we can still upgrade the mastercontainer via the webinterface manually by opening '/api/docker/getwatchtower'
|
||||
// If one of the links below should ever become outdated, we can still upgrade the mastercontainer via the webinterface manually by posting to '/api/docker/watchtower'
|
||||
$name = $this->normalizeImageName($name);
|
||||
|
||||
try {
|
||||
|
||||
@@ -23,7 +23,7 @@ readonly class GitHubContainerRegistryManager
|
||||
return $cachedVersion;
|
||||
}
|
||||
|
||||
// If one of the links below should ever become outdated, we can still upgrade the mastercontainer via the webinterface manually by opening '/api/docker/getwatchtower'
|
||||
// If one of the links below should ever become outdated, we can still upgrade the mastercontainer via the webinterface manually by posting to '/api/docker/watchtower'
|
||||
|
||||
try {
|
||||
$authTokenRequest = $this->guzzleClient->request(
|
||||
|
||||
Reference in New Issue
Block a user