Compare commits

...

32 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
bbafd6ff8c revert: remove borgRestorePassword clearing and rate limiting (to be addressed in separate PRs)
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/d7eb7ba7-23d8-4082-8255-09f1338de24b

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-05-12 10:02:28 +00:00
Simon L.
adcc41f401 Revert "revert: address PR review comments - remove borgRestorePassword clearing and GetTryLogin HTML redirect"
This reverts commit 68bb93a2c8.
2026-05-12 11:58:34 +02:00
copilot-swe-agent[bot]
68bb93a2c8 revert: address PR review comments - remove borgRestorePassword clearing and GetTryLogin HTML redirect
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/55bc79a5-dea6-4bcf-9d13-030209b54382

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-05-12 09:55:20 +00:00
copilot-swe-agent[bot]
a415c76ad2 security: null-check currentScript, handle apcu_inc failure, use apcu_fetch success param
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/f1016d36-0771-46e0-992c-95ce22594414

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-05-04 10:09:07 +00:00
copilot-swe-agent[bot]
79e05f33cd security: enforce APCu availability, fix fixed-window rate limiting, tighten URL validation
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/f1016d36-0771-46e0-992c-95ce22594414

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-05-04 10:06:14 +00:00
copilot-swe-agent[bot]
ef58220c09 security: use persistent HMAC key, validate clean-history target, improve comments
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/f1016d36-0771-46e0-992c-95ce22594414

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-05-04 10:03:53 +00:00
copilot-swe-agent[bot]
6a9e55a8de security: address second round of code-review comments
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/f1016d36-0771-46e0-992c-95ce22594414

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-05-04 10:01:09 +00:00
copilot-swe-agent[bot]
8356d0dadc security: address code-review comments on rate-limit and clean-history script
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/f1016d36-0771-46e0-992c-95ce22594414

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-05-04 09:58:46 +00:00
copilot-swe-agent[bot]
3e72f06d32 security: fix brute-force protection, token history leak, streaming XSS, borg password persistence, and missing cache headers
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/f1016d36-0771-46e0-992c-95ce22594414

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-05-04 09:56:38 +00:00
Simon L.
99ea91c5ef increase to v13.0.1
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-05-04 10:49:10 +02:00
Simon L.
7b2de0683e fix harp container not starting anymore (#8048) 2026-05-04 10:48:29 +02:00
Simon L.
f7b677fb51 fix harp container not starting anymore
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-05-04 10:39:21 +02:00
Simon L.
ee8a5a185c mastercontainer: fix checking for AIO_LOG_LEVEL (#8035) 2026-05-04 10:36:45 +02:00
Simon L.
2b0cb13f35 aio-interface: fix Cross-Origin-* headers not being sent (#8046) 2026-05-04 10:36:22 +02:00
Zoey
a1eaea85ed fix Cross-Origin-* headers not being sent
Signed-off-by: Zoey <zoey@z0ey.de>
2026-05-03 22:34:27 +02:00
Simon L.
c545bffc53 mastercontainer: fix checking for AIO_LOG_LEVEL
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-04-30 16:07:48 +02:00
Simon L.
dc27f8078f nextcloud: update to 33.0.3 (#8032) 2026-04-30 11:22:32 +02:00
Simon L.
9f9846461e nextcloud: update to 33.0.3
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-04-30 11:19:13 +02:00
Simon L.
8e3141ab75 fix update-yaml script detail
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-04-29 18:41:12 +02:00
Simon L.
f060a334d3 collabora: fix log level info (#8030) 2026-04-29 17:59:10 +02:00
Simon L.
4417d1ca7a collabora: fix log level info
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-04-29 17:57:25 +02:00
Simon L.
cdc617d0b7 another fix for redis
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-04-29 17:31:35 +02:00
Simon L.
71dbf98d48 fix detail
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-04-29 17:06:32 +02:00
Simon L.
42e2d88b3e redis: fix log level (#8029) 2026-04-29 17:02:03 +02:00
Simon L.
4682355bfe redis: fix log level
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-04-29 17:01:14 +02:00
Simon L.
13ac536b68 nextcloud: overwrite the log level every start (#8028) 2026-04-29 15:02:35 +02:00
Simon L.
9b9b3b638d nextcloud: overwrite the log level every start
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-04-29 15:01:17 +02:00
Simon L.
7b6bda1f60 postgres: fix healthcheck (#8027) 2026-04-29 14:55:57 +02:00
Simon L.
764314524d caddy: revert being able to adjust the log level for it for now (#8021) 2026-04-29 14:55:21 +02:00
Simon L.
4910c3f012 postgres: fix healthcheck
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-04-29 14:54:36 +02:00
Simon L.
55790da3eb caddy: revert being able to adjust the log level for it for now
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-04-29 14:47:32 +02:00
Simon L.
4e8292b922 acme.Caddyfile: mute caddy warnings
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-04-28 21:38:41 +02:00
19 changed files with 65 additions and 22 deletions

View File

@@ -10,7 +10,7 @@
}
log {
level {$CADDY_LOG_LEVEL}
level ERROR
}
}

View File

@@ -9,8 +9,6 @@ if [ -z "$NC_DOMAIN" ]; then
exit 1
fi
CADDY_LOG_LEVEL="$(echo "$AIO_LOG_LEVEL" | tr '[:lower:]' '[:upper:]')"
export CADDY_LOG_LEVEL
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
export SUPERVISORD_STDOUT=/dev/stdout
else

View File

@@ -6,6 +6,8 @@ fi
if [ "$AIO_LOG_LEVEL" = "warn" ]; then
COLLABORA_LOG_LEVEL="warning"
elif [ "$AIO_LOG_LEVEL" = "info" ]; then
COLLABORA_LOG_LEVEL="notice"
else
COLLABORA_LOG_LEVEL="$AIO_LOG_LEVEL"
fi

View File

@@ -10,7 +10,7 @@
}
log {
level {$CADDY_LOG_LEVEL}
level ERROR
# We need to exclude the remote-host plugin from logging as it would spam the logs
# See https://github.com/nextcloud/all-in-one/pull/7006#issuecomment-4003238239
exclude http.matchers.remote_host

View File

@@ -18,9 +18,9 @@ header {
Referrer-Policy "no-referrer" # Tells the browser to never sent a Referer header. See https://developer.mozilla.org/de/docs/Web/HTTP/Reference/Headers/Referrer-Policy
X-Robots-Tag "noindex, nofollow" # Tells web crawlers to not index this page. See https://developer.mozilla.org/de/docs/Web/HTTP/Reference/Headers/X-Robots-Tag
Origin-Agent-Cluster "?1" # Isolates AIO from other same site pages. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Origin-Agent-Cluster
Cross-Origin-Opener-Policy "same-origin"; # AIO does not use any popup, still we can isolate its BCG if it is opened as a pop up by another page. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cross-Origin-Opener-Policy
Cross-Origin-Embedder-Policy "require-corp"; # Harder rules for cross origin embeds. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cross-Origin-Embedder-Policy
Cross-Origin-Resource-Policy "same-origin"; # Only allow the same origin to load resources. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Cross-Origin_Resource_Policy
Cross-Origin-Opener-Policy "same-origin" # AIO does not use any popup, still we can isolate its BCG if it is opened as a pop up by another page. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cross-Origin-Opener-Policy
Cross-Origin-Embedder-Policy "require-corp" # Harder rules for cross origin embeds. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cross-Origin-Embedder-Policy
Cross-Origin-Resource-Policy "same-origin" # Only allow the same origin to load resources. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Cross-Origin_Resource_Policy
# Permissions-Policy disables browser features that AIO does not use. Since there is no "deny all" option, all known features need to be listed explicitly. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Permissions-Policy
Permissions-Policy "accelerometer=(), ambient-light-sensor=(), aria-notify=(), attribution-reporting=(), autoplay=(), bluetooth=(), browsing-topics=(), camera=(), captured-surface-control=(), ch-ua-high-entropy-values=(), compute-pressure=(), cross-origin-isolated=(), deferred-fetch=(), deferred-fetch-minimal=(), display-capture=(), encrypted-media=(), fullscreen=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), identity-credentials-get=(), idle-detection=(), local-fonts=(), local-network=(), local-network-access=(), loopback-network=(), magnetometer=(), microphone=(), midi=(), on-device-speech-recognition=(), otp-credentials=(), payment=(), picture-in-picture=(), private-state-token-issuance=(), private-state-token-redemption=(), publickey-credentials-create=(), publickey-credentials-get=(), screen-wake-lock=(), serial=(), storage-access=(), summarizer=(), usb=(), web-share=(), window-management=(), xr-spatial-tracking=()"

View File

@@ -9,7 +9,7 @@
}
log {
level {$CADDY_LOG_LEVEL}
level ERROR
# We need to exclude the remote-host plugin from logging as it would spam the logs
# See https://github.com/nextcloud/all-in-one/pull/7006#issuecomment-4003238239
exclude http.matchers.remote_host

View File

@@ -338,7 +338,7 @@ else
fi
# Log level logics
if [ -n "$AIO_LOG_LEVEL" ] && ! grep -q "^debug$\|^info$\|^warn$\|^error$"; then
if [ -n "$AIO_LOG_LEVEL" ] && ! echo "$AIO_LOG_LEVEL" | grep -q "^debug$\|^info$\|^warn$\|^error$"; then
print_red "AIO_LOG_LEVEL must be one of 'debug', 'info', 'warn' or 'error'.
It is set to '$AIO_LOG_LEVEL'".
exit 1
@@ -347,13 +347,11 @@ if [ -z "$AIO_LOG_LEVEL" ]; then
export AIO_LOG_LEVEL="warn"
fi
CADDY_LOG_LEVEL="$(echo "$AIO_LOG_LEVEL" | tr '[:lower:]' '[:upper:]')"
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
export SUPERVISORD_STDOUT=/dev/stdout
else
export SUPERVISORD_STDOUT=NONE
fi
export CADDY_LOG_LEVEL
# Check if ghcr.io is reachable
# Solves issues like https://github.com/nextcloud/all-in-one/discussions/5268

View File

@@ -8,7 +8,7 @@ ENV SOURCE_LOCATION=/usr/src/nextcloud
ENV REDIS_DB_INDEX=0
# AIO settings start # Do not remove or change this line!
ENV NEXTCLOUD_VERSION=33.0.2
ENV NEXTCLOUD_VERSION=33.0.3
ENV AIO_TOKEN=123456
ENV AIO_URL=localhost
# AIO settings end # Do not remove or change this line!

View File

@@ -671,6 +671,7 @@ fi
# Adjusting log files to be stored on a volume
echo "Adjusting log files..."
php /var/www/html/occ config:system:set upgrade.cli-upgrade-link --value="https://github.com/nextcloud/all-in-one/discussions/2726"
php /var/www/html/occ config:system:set loglevel --value="$NEXTCLOUD_LOG_LEVEL" --type=integer
if [ "$NEXTCLOUD_LOG_TYPE" = "errorlog" ]; then
php /var/www/html/occ config:system:set log_type --value="errorlog"
php /var/www/html/occ config:system:set log_type_audit --value="errorlog"

View File

@@ -14,6 +14,7 @@ RUN set -ex; \
bash \
openssl \
shadow \
netcat-openbsd \
grep; \
\
# We need to use the same gid and uid as on old installations

View File

@@ -6,6 +6,9 @@ fi
test -f "/mnt/data/backup-is-running" && exit 0
PGPASSWORD="$POSTGRES_PASSWORD" psql -h 127.0.0.1 -p 11000 -U "oc_$POSTGRES_USER" -d "$POSTGRES_DB" -c "select now()" && exit 0
# If database import is running, do not continue with the health check
if nc -z 127.0.0.1 11000; then
exit 0
fi
PGPASSWORD="$POSTGRES_PASSWORD" psql -h 127.0.0.1 -p 5432 -U "oc_$POSTGRES_USER" -d "$POSTGRES_DB" -c "select now()" || exit 1

View File

@@ -4,8 +4,11 @@ if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
set -x
fi
if [ "$AIO_LOG_LEVEL" = "warn" ]; then
# Redis only supports [debug, verbose, notice, warning, nothing] as log level
if [ "$AIO_LOG_LEVEL" = "warn" ] || [ "$AIO_LOG_LEVEL" = "error" ]; then
REDIS_LOG_LEVEL="warning"
elif [ "$AIO_LOG_LEVEL" = "info" ]; then
REDIS_LOG_LEVEL="notice"
else
REDIS_LOG_LEVEL="$AIO_LOG_LEVEL"
fi

View File

@@ -100,7 +100,7 @@ sed -i 's|NC_DOMAIN=|NC_DOMAIN=yourdomain.com # TODO! Needs to be chang
sed -i 's|NEXTCLOUD_PASSWORD=|NEXTCLOUD_PASSWORD= # TODO! This is the password of the initially created Nextcloud admin with username "admin".|' sample.conf
sed -i 's|TIMEZONE=|TIMEZONE=Europe/Berlin # TODO! This is the timezone that your containers will use.|' sample.conf
sed -i 's|COLLABORA_SECCOMP_POLICY=|COLLABORA_SECCOMP_POLICY=--o:security.seccomp=true # Changing the value to false allows to disable the seccomp feature of the Collabora container.|' sample.conf
sed -i 's|AIO_LOG_LEVEL=|AIO_LOG_LEVEL=warning # Allows to adjust the global AIO log level. Valid values are debug, info, warn and error.|' sample.conf
sed -i 's|AIO_LOG_LEVEL=|AIO_LOG_LEVEL=warn # Allows to adjust the global AIO log level. Valid values are debug, info, warn and error.|' sample.conf
sed -i 's|FULLTEXTSEARCH_JAVA_OPTIONS=|FULLTEXTSEARCH_JAVA_OPTIONS="-Xms512M -Xmx512M" # Allows to adjust the fulltextsearch java options.|' sample.conf
sed -i 's|NEXTCLOUD_STARTUP_APPS=|NEXTCLOUD_STARTUP_APPS="deck twofactor_totp tasks calendar contacts notes" # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. You can also disable apps by using a hyphen in front of them. E.g. "-app_api"|' sample.conf
sed -i 's|NEXTCLOUD_ADDITIONAL_APKS=|NEXTCLOUD_ADDITIONAL_APKS=imagemagick # This allows to add additional packages to the Nextcloud container permanently. Default is imagemagick but can be overwritten by modifying this value.|' sample.conf

View File

@@ -892,7 +892,6 @@
"environment": [
"HP_SHARED_KEY=%HP_SHARED_KEY%",
"NC_INSTANCE_URL=https://%NC_DOMAIN%",
"HP_LOG_LEVEL=%COLLABORA_LOG_LEVEL%",
"HP_FRP_DISABLE_TLS=true",
"TZ=%TIMEZONE%"
],

View File

@@ -0,0 +1,26 @@
// This script is loaded after a successful token-based login.
// It replaces the browser's current history entry (stripping the token from the
// URL) before navigating to the main AIO page, so the token is never left in
// the browser history and cannot be accidentally exposed via the back-button.
//
// The target URL is passed via the script tag's data-target attribute.
// document.currentScript is only available during synchronous script execution
// (not with defer/async), so this script is loaded without those attributes.
//
// We replace with location.pathname only (no query string, no hash), which
// intentionally strips the ?token=… parameter and any hash fragment from the
// recorded history entry.
// Guard against environments where document.currentScript may be null.
if (!document.currentScript) {
window.location.replace('/');
} else {
const rawTarget = document.currentScript.dataset.target;
// Only accept the exact relative path we set server-side to prevent any
// potential open-redirect via a manipulated data-target value.
const target = rawTarget === '../../' ? rawTarget : '/';
history.replaceState(null, '', location.pathname);
window.location.replace(target);
}

View File

@@ -181,7 +181,7 @@ $app->get('/containers', function (Request $request, Response $response, array $
'community_containers' => $configurationManager->listAvailableCommunityContainers(),
'community_containers_enabled' => $configurationManager->aioCommunityContainers,
'bypass_container_update' => $bypass_container_update,
]);
])->withHeader('Cache-Control', 'no-store');
})->setName('profile');
$app->get('/login', function (Request $request, Response $response, array $args) use ($container) {
$view = Twig::fromRequest($request);
@@ -209,7 +209,7 @@ $app->get('/setup', function (Request $request, Response $response, array $args)
[
'password' => $setup->Setup(),
]
);
)->withHeader('Cache-Control', 'no-store');
});
$app->get('/log', function (Request $request, Response $response, array $args) use ($container) {
$params = $request->getQueryParams();

View File

@@ -339,7 +339,7 @@ readonly class DockerController {
$body = $nonbufResp->getBody();
$addToStreamingResponseBody = function (string $message) use ($body) : void {
$body->write("<div>$message</div>");
$body->write('<div>' . htmlspecialchars($message, ENT_QUOTES | ENT_HTML5) . '</div>');
};
$this->dockerActionManager->SystemPrune($addToStreamingResponseBody);
@@ -430,7 +430,7 @@ readonly class DockerController {
// if it'll actually pull an image), but which should not need to know anything about the
// wanted markup or formatting.
$addToStreamingResponseBody = function (Container $container, string $message) use ($nonbufResp) : void {
$nonbufResp->getBody()->write("<div>{$container->displayName}: {$message}</div>");
$nonbufResp->getBody()->write('<div>' . htmlspecialchars($container->displayName, ENT_QUOTES | ENT_HTML5) . ': ' . htmlspecialchars($message, ENT_QUOTES | ENT_HTML5) . '</div>');
};
return $addToStreamingResponseBody;

View File

@@ -39,7 +39,19 @@ readonly class LoginController {
$token = $request->getQueryParams()['token'] ?? '';
if($this->authManager->CheckToken($token)) {
$this->authManager->SetAuthState(true);
return $response->withHeader('Location', '../..')->withStatus(302);
// Return a minimal HTML page that uses JavaScript to replace the browser's
// current history entry (removing the token from it) before navigating to
// the main AIO page. This prevents the token from remaining in browser history.
// The script is served from 'self'; same-origin scripts are already trusted under
// the 'script-src-elem self' CSP directive, so no SRI hash is needed here.
$response->getBody()->write(
'<!DOCTYPE html>' .
'<html lang="en">' .
'<head><script src="../../clean-history.js" data-target="../../"></script></head>' .
'<body></body>' .
'</html>'
);
return $response->withHeader('Content-Type', 'text/html; charset=utf-8')->withStatus(200);
}
// Punish failed auth attempts with a delay, as a very simple means against bots.

View File

@@ -1 +1 @@
13.0.0
13.0.1