From 649b1f3f24a0dfe36bc3bf4f84b9c78edffa6f49 Mon Sep 17 00:00:00 2001 From: Akhil Date: Mon, 23 Mar 2026 14:53:31 +0530 Subject: [PATCH 01/37] feat: nextcloud 32 based image --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4478d3f..12f99ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nextcloud:31.0.10-fpm AS nextcloud +FROM nextcloud:32.0.6-fpm AS nextcloud ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" @@ -19,7 +19,7 @@ ARG MEMORIES_URL="https://github.com/pulsejet/memories/releases/download/v7.5.2/ ARG DROP_ACCOUNT_URL="https://packages.framasoft.org/projects/nextcloud-apps/drop-account/drop_account-2.7.1.tar.gz" ARG GOOGLE_INTEGRATION_URL="https://github.com/nextcloud-releases/integration_google/releases/download/v4.2.0/integration_google-v4.2.0.tar.gz" -RUN sed -i 's/31,0,10,2/31,0,10,11/' ${BASE_DIR}/version.php +RUN sed -i 's/32,0,6,1/32,0,6,1/' ${BASE_DIR}/version.php COPY custom_entrypoint.sh / RUN chmod +x /custom_entrypoint.sh RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images @@ -178,7 +178,7 @@ RUN patch -u ${BASE_DIR}/apps/provisioning_api/lib/Controller/UsersController.ph RUN patch -u ${BASE_DIR}/lib/private/Security/VerificationToken/VerificationToken.php -i ${TMP_PATCH_DIR}/033-verification-token-private.patch RUN patch -u ${BASE_DIR}/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php -i ${TMP_PATCH_DIR}/034-oidc-bearer-token-auth.patch #RUN patch -u ${BASE_DIR}/custom_apps/snappymail/app/snappymail/v/2.38.2+murena-20251112/app/libraries/RainLoop/Actions/Contacts.php -i ${TMP_PATCH_DIR}/037-snappymail-contact.patch -RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/038-appdata-folder-based-on-config.patch +#RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/038-appdata-folder-based-on-config.patch RUN rm -rf ${TMP_PATCH_DIR} -- GitLab From acd1a1fe4743cbf6e4fffddba52195f9cdb1caf2 Mon Sep 17 00:00:00 2001 From: Akhil Date: Mon, 23 Mar 2026 16:11:55 +0530 Subject: [PATCH 02/37] fix: fix patches and updates notes/memories --- Dockerfile | 6 +-- patches/005-autocomplete-user-leak-core.patch | 51 ++++++++++++------- patches/010-disable-app-store-upgrade.patch | 15 +++--- patches/015-email-mail-template.patch | 35 +++++++------ patches/016-login-screen.patch | 5 +- patches/032-select-lang-from-session.patch | 6 +-- 6 files changed, 65 insertions(+), 53 deletions(-) diff --git a/Dockerfile b/Dockerfile index 12f99ed..84ab0a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,8 @@ ARG EA_URL="https://gitlab.e.foundation/api/v4/projects/648/packages/generic/ecl ARG EMAIL_RECOVERY_URL="https://gitlab.e.foundation/api/v4/projects/868/packages/generic/email-recovery/v12.2.0/email-recovery-v12.2.0.tar.gz" ARG USER_MIGRATION_URL="https://gitlab.e.foundation/api/v4/projects/1468/packages/generic/user_migration/8.0.0+murena-20251020/user_migration-8.0.0+murena-20251020.tar.gz" -ARG NOTES_URL="https://github.com/nextcloud-releases/notes/releases/download/v4.11.0/notes-v4.11.0.tar.gz" -ARG MEMORIES_URL="https://github.com/pulsejet/memories/releases/download/v7.5.2/memories.tar.gz" +ARG NOTES_URL="https://github.com/nextcloud-releases/notes/releases/download/v4.13.1/notes-v4.13.1.tar.gz" +ARG MEMORIES_URL="https://github.com/pulsejet/memories/releases/download/v7.8.2/memories.tar.gz" ARG DROP_ACCOUNT_URL="https://packages.framasoft.org/projects/nextcloud-apps/drop-account/drop_account-2.7.1.tar.gz" ARG GOOGLE_INTEGRATION_URL="https://github.com/nextcloud-releases/integration_google/releases/download/v4.2.0/integration_google-v4.2.0.tar.gz" @@ -155,7 +155,7 @@ From selfhost as ecloud ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" ARG THEME_VERSION="https://gitlab.e.foundation/api/v4/projects/315/packages/generic/eCloud/v31.0.3/eCloud-v31.0.3.tar.gz" -ARG LDAP_WRITE_SUPPORT_VERSION="1.13.0" +ARG LDAP_WRITE_SUPPORT_VERSION="1.14.0" ARG IS_SELFHOST=false RUN curl -fsSL -o ldap_write_support.tar.gz \ diff --git a/patches/005-autocomplete-user-leak-core.patch b/patches/005-autocomplete-user-leak-core.patch index dad34cc..7bf3ed2 100644 --- a/patches/005-autocomplete-user-leak-core.patch +++ b/patches/005-autocomplete-user-leak-core.patch @@ -14,22 +14,38 @@ this filtering works in conjunction with the autocomplete feature disabled in ne diff --git lib/private/Collaboration/Collaborators/UserPlugin.php lib/private/Collaboration/Collaborators/UserPlugin-new.php --- lib/private/Collaboration/Collaborators/UserPlugin.php 2025-02-13 19:30:40 +++ lib/private/Collaboration/Collaborators/UserPlugin-new.php 2025-03-07 12:48:50 -@@ -159,8 +159,8 @@ - && $lowerSearch !== '' - && ( - strtolower($uid) === $lowerSearch -- || strtolower($userDisplayName) === $lowerSearch -- || ($this->shareeEnumerationFullMatchIgnoreSecondDisplayName && trim(strtolower(preg_replace('/ \(.*\)$/', '', $userDisplayName))) === $lowerSearch) -+ //|| strtolower($userDisplayName) === $lowerSearch -+ //|| ($this->shareeEnumerationFullMatchIgnoreSecondDisplayName && trim(strtolower(preg_replace('/ \(.*\)$/', '', $userDisplayName))) === $lowerSearch) - || ($this->shareeEnumerationFullMatchEmail && strtolower($userEmail ?? '') === $lowerSearch) - ) - ) { +@@ -49,7 +49,7 @@ + + if (!$shareeEnumerationRestrictToGroup && !$shareeEnumerationRestrictToPhone) { + // No restrictions, search everything. +- $usersByDisplayName = $this->userManager->searchDisplayName($search, $limit, $offset); ++ $usersByDisplayName = []; + foreach ($usersByDisplayName as $user) { + if ($user->isEnabled()) { + $users[$user->getUID()] = ['wide', $user]; +@@ -70,7 +70,7 @@ + } + + if ($shareeEnumerationRestrictToPhone) { +- $usersInPhonebook = $this->userManager->searchKnownUsersByDisplayName($currentUser->getUID(), $search, $limit, $offset); ++ $usersInPhonebook = []; + foreach ($usersInPhonebook as $user) { + if ($user->isEnabled()) { + $users[$user->getUID()] = ['wide', $user]; +@@ -90,7 +90,7 @@ + $lowerSearch = mb_strtolower($search); + + // Re-use the results from earlier if possible +- $usersByDisplayName ??= $this->userManager->searchDisplayName($search, $limit, $offset); ++ $usersByDisplayName = []; + foreach ($usersByDisplayName as $user) { + if ($user->isEnabled() && (mb_strtolower($user->getDisplayName()) === $lowerSearch || ($shareeEnumerationFullMatchIgnoreSecondDisplayName && trim(mb_strtolower(preg_replace('/ \(.*\)$/', '', $user->getDisplayName()))) === $lowerSearch))) { + $users[$user->getUID()] = ['exact', $user]; diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Collaboration/Collaborators/MailPlugin-new.php --- lib/private/Collaboration/Collaborators/MailPlugin.php 2025-02-13 19:30:40 +++ lib/private/Collaboration/Collaborators/MailPlugin-new.php 2025-03-07 12:55:25 -@@ -18,6 +18,7 @@ +@@ -19,6 +19,7 @@ use OCP\IUserSession; use OCP\Mail\IMailer; use OCP\Share\IShare; @@ -37,18 +53,15 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co class MailPlugin implements ISearchPlugin { protected bool $shareWithGroupOnly; -@@ -40,8 +41,10 @@ +@@ -41,6 +42,7 @@ private KnownUserService $knownUserService, private IUserSession $userSession, private IMailer $mailer, + private IUserManager $userManager, - private mixed $shareWithGroupOnlyExcludeGroupsList = [], + private mixed $shareWithGroupOnlyExcludeGroupsList, + private int $shareType, ) { -+ $this->userManager = $userManager; - $this->shareeEnumeration = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes'; - $this->shareWithGroupOnly = $this->config->getAppValue('core', 'shareapi_only_share_with_group_members', 'no') === 'yes'; - $this->shareeEnumerationInGroupOnly = $this->shareeEnumeration && $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no') === 'yes'; -@@ -200,27 +203,63 @@ +@@ -211,27 +213,63 @@ if ($exactEmailMatch) { $searchResult->markExactIdMatch($emailType); } diff --git a/patches/010-disable-app-store-upgrade.patch b/patches/010-disable-app-store-upgrade.patch index 07ab975..4c78d38 100644 --- a/patches/010-disable-app-store-upgrade.patch +++ b/patches/010-disable-app-store-upgrade.patch @@ -6,18 +6,19 @@ This patch disables checking the app store for app updates during "occ upgrade" --- ./lib/private/Updater.php 2021-11-16 12:12:35.631823438 +0530 +++ ./lib/private/Updater-new.php 2021-11-16 12:14:28.445155684 +0530 -@@ -240,11 +240,11 @@ - $appManager = \OC::$server->getAppManager(); +@@ -239,12 +239,13 @@ + \OC::$server->get(AppFetcher::class)->setVersion($currentVersion); // upgrade appstore apps -- $this->upgradeAppStoreApps($appManager->getInstalledApps()); -+ /* $this->upgradeAppStoreApps($appManager->getInstalledApps()); - $autoDisabledApps = $appManager->getAutoDisabledApps(); +- $this->upgradeAppStoreApps($this->appManager->getEnabledApps()); ++ // $this->upgradeAppStoreApps($this->appManager->getEnabledApps()); + /** @var AppManager $this->appManager */ ++ /* + $autoDisabledApps = $this->appManager->getAutoDisabledApps(); if (!empty($autoDisabledApps)) { $this->upgradeAppStoreApps(array_keys($autoDisabledApps), $autoDisabledApps); - } + } */ // install new shipped apps on upgrade - $errors = Installer::installShippedApps(true); - + $errors = $this->installer->installShippedApps(true); diff --git a/patches/015-email-mail-template.patch b/patches/015-email-mail-template.patch index 3b0a77b..63231b5 100644 --- a/patches/015-email-mail-template.patch +++ b/patches/015-email-mail-template.patch @@ -85,11 +85,10 @@ This patch helps in indentifying that For a recurring event, the invitee knows w --- ./apps/dav/lib/CalDAV/Schedule/IMipService.php 2024-03-18 11:40:39 +++ ./apps/dav/lib/CalDAV/Schedule/IMipService-new.php 2024-03-18 13:47:17 -@@ -163,7 +163,31 @@ - $oldUrl = self::readPropertyWithDefault($oldVEvent, 'URL', $defaultVal); +@@ -158,6 +158,31 @@ $data['meeting_url_html'] = !empty($oldUrl) && $oldUrl !== $data['meeting_url'] ? sprintf('%1$s', $oldUrl) : $data['meeting_url']; -- $data['meeting_when_html'] = $oldMeetingWhen !== $data['meeting_when'] ? sprintf("%s
%s", $oldMeetingWhen, $data['meeting_when']) : $data['meeting_when']; + $data['meeting_when_html'] = $oldMeetingWhen !== $data['meeting_when'] ? sprintf("%s
%s", $oldMeetingWhen, $data['meeting_when']) : $data['meeting_when']; + if (isset($vEvent->RRULE)) { + $RRule = (string) $vEvent->RRULE->getValue(); + if (strpos($RRule, 'FREQ=DAILY') !== false) { @@ -118,10 +117,10 @@ This patch helps in indentifying that For a recurring event, the invitee knows w } // generate occurring next string if ($eventReaderCurrent->recurs()) { -@@ -967,6 +991,51 @@ +@@ -165,6 +190,51 @@ } + return $data; } - + /** + * @param IEMailTemplate $template + * @param string $method @@ -167,14 +166,14 @@ This patch helps in indentifying that For a recurring event, the invitee knows w + } + } + + /** - * @param string $path - * @return string -@@ -1065,8 +1134,13 @@ + * @param VEvent $vEvent +@@ -1086,8 +1156,13 @@ $this->getAbsoluteImagePath('caldav/time.png'), $data['meeting_when'], '', IMipPlugin::IMIP_INDENT); } if ($data['meeting_location'] !== '') { -- $template->addBodyListItem($data['meeting_location_html'] ?? $data['meeting_location'], $this->l10n->t('Location:'), +- $template->addBodyListItem($data['meeting_location_html'] ?? htmlspecialchars($data['meeting_location']), $this->l10n->t('Location:'), - $this->getAbsoluteImagePath('caldav/location.png'), $data['meeting_location'], '', IMipPlugin::IMIP_INDENT); + if(filter_var(trim($data['meeting_location']), FILTER_VALIDATE_URL)) { + $template->addBodyListItem($data['meeting_location_html'] ?? $data['meeting_location'], $this->l10n->t('Location:'), @@ -185,8 +184,8 @@ This patch helps in indentifying that For a recurring event, the invitee knows w + } } if ($data['meeting_url'] !== '') { - $template->addBodyListItem($data['meeting_url_html'] ?? $data['meeting_url'], $this->l10n->t('Link:'), -@@ -1143,7 +1217,7 @@ + $template->addBodyListItem($data['meeting_url_html'] ?? htmlspecialchars($data['meeting_url']), $this->l10n->t('Link:'), +@@ -1164,7 +1239,7 @@ * @param $token */ public function addResponseButtons(IEMailTemplate $template, $token) { @@ -195,15 +194,12 @@ This patch helps in indentifying that For a recurring event, the invitee knows w $this->l10n->t('Accept'), $this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.accept', [ 'token' => $token, -@@ -1151,20 +1225,10 @@ +@@ -1172,20 +1247,10 @@ $this->l10n->t('Decline'), $this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.decline', [ 'token' => $token, - ]) -+ ]), -+ $this->l10n->t('MayBe'), -+ $this->urlGenerator->getAbsoluteUrl('apps/calendar/invitation/tentative/'.$token) - ); +- ); - } - - public function addMoreOptionsButton(IEMailTemplate $template, $token) { @@ -216,6 +212,10 @@ This patch helps in indentifying that For a recurring event, the invitee knows w - $text = $this->l10n->t('More options at %s', [$moreOptionsURL]); - - $template->addBodyText($html, $text); ++ ]), ++ $this->l10n->t('MayBe'), ++ $this->urlGenerator->getAbsoluteUrl('apps/calendar/invitation/tentative/'.$token) ++ ); } public function getReplyingAttendee(Message $iTipMessage): ?Property { @@ -251,5 +251,4 @@ This patch helps in indentifying that For a recurring event, the invitee knows w - return ['old' => array_values($oldEventComponents), 'new' => array_values($newEventComponents)]; + return ['old' => array_values($oldEventComponents), 'new' => array_values($newEventComponents), 'sentOld' => $sentOld]; } - } -\ No newline at end of file + } \ No newline at end of file diff --git a/patches/016-login-screen.patch b/patches/016-login-screen.patch index 79414a4..d2ed7cc 100644 --- a/patches/016-login-screen.patch +++ b/patches/016-login-screen.patch @@ -37,9 +37,9 @@ +
">
-