diff --git a/Dockerfile b/Dockerfile index b7e6f8d9513aa8c5bdb5f08be2caa9304757e3bb..951180eae512604e636b4048c9d13c6ac3ca4351 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM nextcloud:23.0.11-fpm AS nextcloud +FROM nextcloud:24.0.7-fpm AS nextcloud ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" -ARG THEME_VERSION="23.0.3" +ARG THEME_VERSION="24.0.0" ARG THEME_HELPER_JOB_ID="433795" ARG NEWS_VERSION="19.0.0" ARG QUOTA_WARN_VERSION="1.15.0" @@ -9,16 +9,16 @@ ARG NOTES_VERSION="4.5.1" ARG CONTACTS_JOB_ID="400045" ARG CALENDAR_JOB_ID="435164" ARG USER_BACKEND_RAW_SQL_VERSION="1.3.0" -ARG EMAIL_RECOVERY_JOB_ID="433031" +ARG EMAIL_RECOVERY_JOB_ID="445958" ARG RAINLOOP_VERSION="7.2.5" ARG RAINLOOP_COMMIT_SHA="523518ba" -ARG EA_JOB_ID="433303" -ARG ECLOUD_LAUNCHER_JOB_ID="432959" +ARG EA_JOB_ID="445966" +ARG ECLOUD_LAUNCHER_JOB_ID="445974" ARG GOOGLE_INTEGRATION_VERSION="1.0.8" -ARG LDAP_WRITE_SUPPORT_VERSION="1.4.0" -ARG OIDC_LOGIN_VERSION="2.3.3" +ARG LDAP_WRITE_SUPPORT_VERSION="1.6.0" +ARG OIDC_LOGIN_VERSION="2.4.0" -RUN sed -i 's/23,0,11,1/23,0,11,6/' ${BASE_DIR}/version.php +RUN sed -i 's/24,0,7,1/24,0,7,8/' ${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 @@ -97,7 +97,7 @@ RUN curl -fsSL -o ecloud-accounts.zip \ rm ecloud-accounts.zip; RUN curl -fsSL -o ldap_write_support.tar.gz \ - "https://github.com/nextcloud-releases/ldap_write_support/releases/download/v${LDAP_WRITE_SUPPORT_VERSION}/ldap_write_support.tar.gz" && \ + "https://github.com/nextcloud-releases/ldap_write_support/releases/download/v${LDAP_WRITE_SUPPORT_VERSION}/ldap_write_support-v${LDAP_WRITE_SUPPORT_VERSION}.tar.gz" && \ tar -xf ldap_write_support.tar.gz -C ${BASE_DIR}/custom_apps && \ rm ldap_write_support.tar.gz @@ -135,16 +135,17 @@ RUN patch -u ${BASE_DIR}/core/Command/User/Setting.php -i ${TMP_PATCH_DIR}/018-o RUN patch -u ${BASE_DIR}/apps/settings/lib/Sections/Personal/Groupware.php -i ${TMP_PATCH_DIR}/019-groupware.patch RUN patch -u ${BASE_DIR}/lib/private/Notification/Manager.php -i ${TMP_PATCH_DIR}/020-fairuse-notification-fix.patch RUN patch -u ${BASE_DIR}/apps/files/js/files.js -i ${TMP_PATCH_DIR}/021-repeated-storage-dialog-fix.patch +RUN cd ${BASE_DIR} && patch -u ${BASE_DIR}/3rdparty/sabre/vobject/lib/ITip/Broker.php -i ${TMP_PATCH_DIR}/022-significantchange.patch RUN rm -rf ${TMP_PATCH_DIR} # show reset pwd page with a query param -RUN cd ${BASE_DIR}/core/js/dist && sed -i 's/resetPassword:!1/resetPassword:!1||Z.showResetPassword==="1"/' login.js +RUN cd ${BASE_DIR}/dist && sed -i 's/resetPassword:!1/resetPassword:!1||Z.showResetPassword==="1"/' core-login.js # hide oidc login button RUN sed -i 's/$context->registerAlternativeLogin(OIDCLoginOption::class);/\/\/$context->registerAlternativeLogin(OIDCLoginOption::class);/' ${BASE_DIR}/custom_apps/oidc_login/lib/AppInfo/Application.php # change notifications icon src -RUN sed -i 's/(0,Pd.imagePath)("notifications",e)/"\/themes\/"+OC.theme.folder+"\/apps\/notifications\/img\/"+e+".svg"/' ${BASE_DIR}/apps/notifications/js/notifications-main.js +RUN sed -i 's/(0,zd.imagePath)("notifications",e)/"\/themes\/"+OC.theme.folder+"\/apps\/notifications\/img\/"+e+".svg"/' ${BASE_DIR}/apps/notifications/js/notifications-main.js # sed version of ldap_write_support RUN cd ${BASE_DIR}/custom_apps/ldap_write_support && sed -i 's/max-version="22"/max-version="23"/' appinfo/info.xml diff --git a/patches/005-autocomplete-user-leak-core.patch b/patches/005-autocomplete-user-leak-core.patch index 68d0f74e14c6e20ec8a5bfc4ee5fb1ebb8312010..a50b4f79ba737b35ac4824f5c982b3b37ea54587 100644 --- a/patches/005-autocomplete-user-leak-core.patch +++ b/patches/005-autocomplete-user-leak-core.patch @@ -12,23 +12,26 @@ 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 2021-01-25 15:56:05.000000000 +0100 -+++ lib/private/Collaboration/Collaborators/UserPlugin-new.php 2021-02-16 14:56:26.778152834 +0100 -@@ -186,8 +186,8 @@ +--- lib/private/Collaboration/Collaborators/UserPlugin.php 2022-11-23 17:19:20.220495300 +0530 ++++ lib/private/Collaboration/Collaborators/UserPlugin-new.php 2022-11-23 17:19:05.690495300 +0530 +@@ -186,9 +186,9 @@ if ( $this->shareeEnumerationFullMatch && $lowerSearch !== '' && (strtolower($uid) === $lowerSearch || - strtolower($userDisplayName) === $lowerSearch || - ($this->shareeEnumerationFullMatchIgnoreSecondDisplayName && trim(strtolower(preg_replace('/ \(.*\)$/', '', $userDisplayName))) === $lowerSearch) || +- ($this->shareeEnumerationFullMatchEmail && strtolower($userEmail ?? '') === $lowerSearch)) + // strtolower($userDisplayName) === $lowerSearch || + // ($this->shareeEnumerationFullMatchIgnoreSecondDisplayName && trim(strtolower(preg_replace('/ \(.*\)$/', '', $userDisplayName))) === $lowerSearch) || - ($this->shareeEnumerationFullMatchEmail && strtolower($userEmail) === $lowerSearch)) ++ ($this->shareeEnumerationFullMatchEmail && strtolower($userEmail) === $lowerSearch)) ) { if (strtolower($uid) === $lowerSearch) { + $foundUserById = true; + diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Collaboration/Collaborators/MailPlugin-new.php ---- lib/private/Collaboration/Collaborators/MailPlugin.php 2021-06-22 14:53:24.451402977 +0530 -+++ lib/private/Collaboration/Collaborators/MailPlugin-new.php 2021-06-22 14:56:31.201379020 +0530 -@@ -37,6 +37,7 @@ +--- lib/private/Collaboration/Collaborators/MailPlugin.php 2022-11-23 15:20:44.460495300 +0530 ++++ lib/private/Collaboration/Collaborators/MailPlugin-new.php 2022-11-23 16:55:17.540495300 +0530 +@@ -36,6 +36,7 @@ use OCP\IConfig; use OCP\IGroupManager; use OCP\IUser; @@ -36,7 +39,7 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co use OCP\IUserSession; use OCP\Share\IShare; use OCP\Mail\IMailer; -@@ -75,13 +76,15 @@ +@@ -76,13 +77,15 @@ IGroupManager $groupManager, KnownUserService $knownUserService, IUserSession $userSession, @@ -51,9 +54,9 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co $this->userSession = $userSession; + $this->userManager = $userManager; $this->mailer = $mailer; - + $this->shareeEnumeration = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes'; -@@ -218,27 +221,62 @@ +@@ -224,27 +227,63 @@ if ($exactEmailMatch) { $searchResult->markExactIdMatch($emailType); } @@ -67,6 +70,7 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co - 'shareWith' => $emailAddress, - ], - ]; ++ + $isUserinInstance = $this->userManager->get($emailAddress); + if ($isUserinInstance === null) { + // /e/ user is not in ecloud diff --git a/patches/014-add-mail-usage.patch b/patches/014-add-mail-usage.patch index 02836ee9aa0e879a225b3e26ce3048717d8a104f..cd4cf4a08d10a7c1dfea28dbed35adaf09cc7def 100644 --- a/patches/014-add-mail-usage.patch +++ b/patches/014-add-mail-usage.patch @@ -1,23 +1,24 @@ ---- lib/private/legacy/OC_Helper.php 2022-05-17 19:34:56.340385500 +0530 -+++ lib/private/legacy/OC_Helper_new.php 2022-05-17 21:19:30.060385500 +0530 -@@ -532,6 +532,12 @@ - $quota = $sourceStorage->getQuota(); +--- lib/private/legacy/OC_Helper.php 2022-11-23 19:35:50.880495300 +0530 ++++ lib/private/legacy/OC_Helper-new.php 2022-11-23 19:40:09.970495300 +0530 +@@ -543,6 +543,12 @@ } - $free = $sourceStorage->free_space($internalPath); -+ $ownerId = $storage->getOwner($path); -+ $mailQuotaUsage = (int) \OC::$server->getConfig()->getUserValue($ownerId, 'ecloud-accounts', 'mailQuotaUsage', 0); -+ $free = max(0,$free - $mailQuotaUsage); -+ if($path === '/') { -+ $used = $used + $mailQuotaUsage; -+ } - if ($free >= 0) { - $total = $free + $used; - } else { -@@ -547,7 +553,6 @@ + try { + $free = $sourceStorage->free_space($rootInfo->getInternalPath()); ++ $ownerId = $storage->getOwner($path); ++ $mailQuotaUsage = (int) \OC::$server->getConfig()->getUserValue($ownerId, 'ecloud-accounts', 'mailQuotaUsage', 0); ++ $free = max(0,$free - $mailQuotaUsage); ++ if($path === '/') { ++ $used = $used + $mailQuotaUsage; ++ } + } catch (\Exception $e) { + if ($path === "") { + throw $e; +@@ -569,7 +575,7 @@ $relative = 0; } - $ownerId = $storage->getOwner($path); ++ $ownerDisplayName = ''; $owner = \OC::$server->getUserManager()->get($ownerId); if ($owner) { diff --git a/patches/015-email-mail-template.patch b/patches/015-email-mail-template.patch index 72af74d74f97df4bc286f015c87177b1eeb1094a..646253b9ceb9ca205c295b904408975d64843e36 100644 --- a/patches/015-email-mail-template.patch +++ b/patches/015-email-mail-template.patch @@ -4,9 +4,23 @@ Subject: [PATCH] To implement custom email template design for calendar invite This patch is allowing to customize the email template design for invitation ---- ./apps/dav/lib/CalDAV/Schedule/IMipPlugin.php 2022-11-10 10:39:19.134653000 +0530 -+++ ./apps/dav/lib/CalDAV/Schedule/iMipPluginNew.php 2022-11-11 12:28:15.829119700 +0530 -@@ -252,7 +252,21 @@ +--- apps/dav-4/lib/CalDAV/Schedule/IMipPlugin.php 2022-11-10 10:39:19.134653000 +0530 ++++ apps/dav-4/lib/CalDAV/Schedule/iMipPluginNew.php 2022-11-25 15:05:11.443768000 +0530 +@@ -237,6 +237,13 @@ + ]; + + $fromEMail = Util::getDefaultEmailAddress('invitations-noreply'); ++ //if sender name is empty sometimes in case of email client ++ if ($senderName === null || empty(trim($senderName))) { ++ $users = $this->userManager->getByEmail($sender); ++ if (count($users) === 1) { ++ $senderName = $users[0]->getDisplayName(); ++ } ++ } + $fromName = $l10n->t('%1$s via %2$s', [$senderName, $this->defaults->getName()]); + + $message = $this->mailer->createMessage() +@@ -252,7 +259,21 @@ $summary = ((string) $summary !== '') ? (string) $summary : $l10n->t('Untitled event'); @@ -29,7 +43,7 @@ This patch is allowing to customize the email template design for invitation $this->addBulletList($template, $l10n, $vevent); // Only add response buttons to invitation requests: Fix Issue #11230 -@@ -516,6 +530,7 @@ +@@ -516,6 +537,7 @@ return $dtStart->format('Y-m-d') === $dtEnd->format('Y-m-d'); } @@ -37,7 +51,7 @@ This patch is allowing to customize the email template design for invitation /** * @param IEMailTemplate $template * @param IL10N $l10n -@@ -542,24 +557,86 @@ +@@ -542,24 +564,86 @@ /** * @param IEMailTemplate $template * @param IL10N $l10n @@ -79,8 +93,7 @@ This patch is allowing to customize the email template design for invitation + $lastmodified=$dtstampTime; + $selectedEvent = $currentevent; + } - } -- $meetingWhen = $this->generateWhenString($l10n, $vevent); ++ } + if ($selectedEvent->SUMMARY) { + if (trim($selectedEvent->SUMMARY) == trim($parentevent->SUMMARY)) { + $template->addBodyListItem($selectedEvent->SUMMARY, $l10n->t('Title:'), @@ -89,7 +102,8 @@ This patch is allowing to customize the email template design for invitation + $template->addBodyListItemModified($selectedEvent->SUMMARY, $l10n->t('Updated Title:'), + $this->getAbsoluteImagePath('caldav/title.png'),'','',self::IMIP_INDENT); + } -+ } + } +- $meetingWhen = $this->generateWhenString($l10n, $vevent); + $meetingWhen = $this->generateWhenString($l10n, $selectedEvent); if ($meetingWhen) { - $template->addBodyListItem($meetingWhen, $l10n->t('Time:'), @@ -135,7 +149,7 @@ This patch is allowing to customize the email template design for invitation $template->addBodyListItem(sprintf('%s', htmlspecialchars($url), htmlspecialchars($url)), -@@ -567,13 +644,16 @@ +@@ -567,13 +651,16 @@ $this->getAbsoluteImagePath('caldav/link.png'), $url,'',self::IMIP_INDENT); } @@ -158,7 +172,7 @@ This patch is allowing to customize the email template design for invitation } } -@@ -662,7 +742,7 @@ +@@ -662,7 +749,7 @@ Message $iTipMessage, $lastOccurrence) { $token = $this->createInvitationToken($iTipMessage, $lastOccurrence); @@ -167,7 +181,7 @@ This patch is allowing to customize the email template design for invitation $l10n->t('Accept'), $this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.accept', [ 'token' => $token, -@@ -670,18 +750,10 @@ +@@ -670,18 +757,10 @@ $l10n->t('Decline'), $this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.decline', [ 'token' => $token, diff --git a/patches/016-login-screen.patch b/patches/016-login-screen.patch index 178fdf2664598a1a9c8ae7917d2a6d9d0a8555e5..67cef3ce5a67359a081344470370b5cb2cf9562c 100644 --- a/patches/016-login-screen.patch +++ b/patches/016-login-screen.patch @@ -4,7 +4,7 @@ -+ ++ diff --git a/patches/021-repeated-storage-dialog-fix.patch b/patches/021-repeated-storage-dialog-fix.patch index 5efa2a8538baddf90265eda738f529009eebe1d3..a1e189b8b176a4ce5eea5e3b7dc32caeff224417 100644 --- a/patches/021-repeated-storage-dialog-fix.patch +++ b/patches/021-repeated-storage-dialog-fix.patch @@ -1,14 +1,9 @@ ---- apps/files/js/files.js 2022-10-18 14:02:43.814388800 +0530 -+++ apps/files/js/files-new.js 2022-10-18 14:04:54.504388800 +0530 -@@ -181,11 +181,23 @@ +--- apps/files/js/files.js 2022-11-28 19:10:48.625188000 +0530 ++++ apps/files/js/files-new.js 2022-11-28 19:12:41.425188000 +0530 +@@ -181,6 +181,18 @@ {type : 'error'} ); } else { -- OC.Notification.show(t('files', -- 'Your storage is full, files cannot be updated or synced anymore!'), -- {type: 'error'} -- ); -- } + var exist=0; + $('body').find('.toastify').each(function(i, obj) { + var toastmsg=$(obj).text(); @@ -21,14 +16,9 @@ + if(exist==1){ + return; + } -+ OC.Notification.show(t('files', -+ 'Your storage is full, files cannot be updated or synced anymore!'), -+ {type: 'error'} -+ ); -+ } - } else if (usedSpacePercent > 90) { - if (owner !== OC.getCurrentUser().uid) { - OC.Notification.show(t('files', 'Storage of {owner} is almost full ({usedSpacePercent}%).', + OC.Notification.show(t('files', + 'Your storage is full, files cannot be updated or synced anymore!'), + {type: 'error'} @@ -210,6 +222,19 @@ {type : 'error'} ); diff --git a/patches/022-significantchange.patch b/patches/022-significantchange.patch index 8040a53cadf9a1f02ec8bb8aa0f0a810cbf6f657..769174993d999ac331f5e896511cc7065c966e1a 100644 --- a/patches/022-significantchange.patch +++ b/patches/022-significantchange.patch @@ -5,13 +5,14 @@ Subject: [PATCH] To allow significant change to send mail for summary and descri This patch is allowing to to send mail for summary and description change --- ./3rdparty/sabre/vobject/lib/ITip/Broker.php 2022-09-06 21:39:42.985827300 +0530 -+++ ./3rdparty/sabre/vobject/lib/ITip/Broker-New.php 2022-11-11 12:45:53.449119700 +0530 -@@ -75,6 +75,8 @@ ++++ ./3rdparty/sabre/vobject/lib/ITip/Broker-New.php 2022-11-28 18:57:50.315188000 +0530 +@@ -75,6 +75,9 @@ 'RDATE', 'EXDATE', 'STATUS', + 'SUMMARY', + 'DESCRIPTION', ++ 'LOCATION', ]; - /** + /** \ No newline at end of file