diff --git a/Dockerfile b/Dockerfile index a475e7bbc119e3ff52da5240be185781f4605ddf..de2da0c2c6e0316e436df39d2dee74495d3f82df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nextcloud:31.0.9-fpm AS nextcloud +FROM nextcloud:31.0.10-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/integration_google/releases/download/v1.0.9/integration_google-1.0.9.tar.gz" -RUN sed -i 's/31,0,9,1/31,0,9,13/' ${BASE_DIR}/version.php +RUN sed -i 's/31,0,10,2/31,0,10,4/' ${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 @@ -173,8 +173,6 @@ 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-20250822/app/libraries/RainLoop/Actions/Contacts.php -i ${TMP_PATCH_DIR}/037-snappymail-contact.patch -#Below patch will be removed after NC 31 -RUN patch -u ${BASE_DIR}/lib/private/App/AppManager.php -i ${TMP_PATCH_DIR}/038-add-hyphen-to-appid.patch RUN rm -rf ${TMP_PATCH_DIR} @@ -188,7 +186,7 @@ RUN sed -i 's/$this->getAvatarImage($user)/null/' ${BASE_DIR}/apps/dav/lib/CardD # RUN cd ${BASE_DIR}/dist && sed -i 's/resetPassword:!1/resetPassword:!1||Z.showResetPassword==="1"/' core-login.js # add attr about how many notifications to notif icon -RUN sed -i 's/attrs:{id:"notifications",/attrs:{id:"notifications","data-has-notifications":0!==u.notifications.length,/' ${BASE_DIR}/apps/notifications/js/NotificationsApp-BLfRaKfb.chunk.mjs +RUN sed -i 's/attrs:{id:"notifications",/attrs:{id:"notifications","data-has-notifications":0!==u.notifications.length,/' ${BASE_DIR}/apps/notifications/js/NotificationsApp-CL5l4zBd.chunk.mjs # Rename Memories to Gallery RUN sed -i 's/Memories<\/name>/Gallery<\/name>/g' ${BASE_DIR}/custom_apps/memories/appinfo/info.xml diff --git a/patches/005-autocomplete-user-leak-core.patch b/patches/005-autocomplete-user-leak-core.patch index b8d92820bb441e51dacd3bcf101bf1461b36a845..dad34cca20b9430860d87f8bf02733b2097034ef 100644 --- a/patches/005-autocomplete-user-leak-core.patch +++ b/patches/005-autocomplete-user-leak-core.patch @@ -14,22 +14,22 @@ 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 -@@ -150,8 +150,8 @@ - if ( - $this->shareeEnumerationFullMatch && - $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)) +@@ -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) + ) ) { - if (strtolower($uid) === $lowerSearch) { 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 -@@ -19,6 +19,7 @@ +@@ -18,6 +18,7 @@ use OCP\IUserSession; use OCP\Mail\IMailer; use OCP\Share\IShare; @@ -37,7 +37,7 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co class MailPlugin implements ISearchPlugin { protected bool $shareWithGroupOnly; -@@ -42,8 +43,10 @@ +@@ -40,8 +41,10 @@ private KnownUserService $knownUserService, private IUserSession $userSession, private IMailer $mailer, @@ -48,7 +48,7 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co $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'; -@@ -204,27 +207,61 @@ +@@ -200,27 +203,63 @@ if ($exactEmailMatch) { $searchResult->markExactIdMatch($emailType); } @@ -64,31 +64,32 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co - ]; + $isUserinInstance = $this->userManager->get($emailAddress); + if ($isUserinInstance === null) { -+ // /e/ user is not in ecloud -+ $result['exact'][] = [ -+ 'label' => $displayName, -+ 'uuid' => $contact['UID'], -+ 'name' => $contact['FN'], -+ 'type' => $emailAddressType ?? '', -+ 'value' => [ -+ 'shareType' => IShare::TYPE_EMAIL, -+ 'shareWith' => $emailAddress, -+ ], -+ ]; ++ // /e/ user is not in ecloud ++ $result['exact'][] = [ ++ 'label' => $displayName, ++ 'uuid' => $contact['UID'], ++ 'name' => $contact['FN'], ++ 'type' => $emailAddressType ?? '', ++ 'value' => [ ++ 'shareType' => IShare::TYPE_EMAIL, ++ 'shareWith' => $emailAddress, ++ ], ++ ]; + } else { + // /e/ user IS an ecloud user, convert to user share type -+ if (!$isUserinInstance->isEnabled()) { ++ if (!$isUserinInstance->isEnabled()) { + // Ignore disabled users + continue; + } + $result['exact'][] = [ + 'label' => $displayName, + 'value' => [ -+ 'shareType' => IShare::TYPE_USER, -+ 'shareWith' => $emailAddress, ++ 'shareType' => IShare::TYPE_USER, ++ 'shareWith' => $emailAddress, + ], + ]; + } ++ } else { - $result['wide'][] = [ - 'label' => $displayName, @@ -102,31 +103,32 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co - ]; + $isUserinInstance = $this->userManager->get($emailAddress); + if ($isUserinInstance === null) { -+ // /e/ user is not in ecloud -+ $result['wide'][] = [ -+ 'label' => $displayName, -+ 'uuid' => $contact['UID'], -+ 'name' => $contact['FN'], -+ 'type' => $emailAddressType ?? '', -+ 'value' => [ -+ 'shareType' => IShare::TYPE_EMAIL, -+ 'shareWith' => $emailAddress, -+ ], -+ ]; ++ // /e/ user is not in ecloud ++ $result['wide'][] = [ ++ 'label' => $displayName, ++ 'uuid' => $contact['UID'], ++ 'name' => $contact['FN'], ++ 'type' => $emailAddressType ?? '', ++ 'value' => [ ++ 'shareType' => IShare::TYPE_EMAIL, ++ 'shareWith' => $emailAddress, ++ ], ++ ]; + } else { -+ // /e/ user IS an ecloud user, convert to user share type -+ if (!$isUserinInstance->isEnabled()) { -+ // Ignore disabled users -+ continue; -+ } -+ $result['wide'][] = [ -+ 'label' => $displayName, -+ 'value' => [ -+ 'shareType' => IShare::TYPE_USER, -+ 'shareWith' => $emailAddress, -+ ], -+ ]; ++ // /e/ user IS an ecloud user, convert to user share type ++ if (!$isUserinInstance->isEnabled()) { ++ // Ignore disabled users ++ continue; ++ } ++ $result['wide'][] = [ ++ 'label' => $displayName, ++ 'value' => [ ++ 'shareType' => IShare::TYPE_USER, ++ 'shareWith' => $emailAddress, ++ ], ++ ]; + } ++ } } } diff --git a/patches/038-add-hyphen-to-appid.patch b/patches/038-add-hyphen-to-appid.patch deleted file mode 100644 index 72e715390005d21acc88744326063731ddb40538..0000000000000000000000000000000000000000 --- a/patches/038-add-hyphen-to-appid.patch +++ /dev/null @@ -1,17 +0,0 @@ -From: Avinash -Date: Mon, 13 Oct 2025 17:30 +0530 -Subject: [PATCH] Added Hyphen to AppId NC31 - -Add Hyphen to App id for NC 31 and In NC 32 - this patch will be deleted. - ---- AppManager.php 2025-10-13 18:34:14 -+++ AppManager-new.php 2025-10-13 18:34:56 -@@ -945,6 +945,6 @@ - */ - public function cleanAppId(string $app): string { - /* Only lowercase alphanumeric is allowed */ -- return preg_replace('/(^[0-9_]|[^a-z0-9_]+|_$)/', '', $app); -+ return preg_replace('/(^[0-9_-]+|[^a-z0-9_-]+|[_-]+$)/', '', $app); - } - } -\ No newline at end of file