Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02df5e72 authored by AVINASH GUSAIN's avatar AVINASH GUSAIN
Browse files

build: update Dockerfile for Nextcloud 30

parent 3e2a6773
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
FROM nextcloud:29.0.16-fpm AS nextcloud
FROM nextcloud:30.0.13-fpm AS nextcloud
ARG BASE_DIR="/usr/src/nextcloud"
ARG TMP_PATCH_DIR="/tmp/build_patches"
ARG THEME_HELPER_JOB_ID="1245676"
ARG THEME_HELPER_JOB_ID="1273671"
ARG NOTES_VERSION="4.11.0"
ARG CONTACTS_JOB_ID="1156314"
ARG CALENDAR_JOB_ID="1242275"
ARG EMAIL_RECOVERY_JOB_ID="1245694"
ARG EA_JOB_ID="1241536"
ARG LAUNCHER_JOB_ID="1235119"
ARG CONTACTS_JOB_ID="1273569"
ARG CALENDAR_JOB_ID="1273554"
ARG EMAIL_RECOVERY_JOB_ID="1273659"
ARG EA_JOB_ID="1273772"
ARG LAUNCHER_JOB_ID="1273647"
ARG GOOGLE_INTEGRATION_VERSION="3.2.0"
ARG DASHBOARD_JOB_ID="1235127"
ARG DASHBOARD_JOB_ID="1273623"
ARG SNAPPY_VERSION="2.37.2"
ARG SNAPPY_THEME_VERSION="4.0.4"
ARG USER_MIGRATION_JOB_ID="1239694"
ARG USER_MIGRATION_JOB_ID="1273698"
ARG MEMORIES_VERSION="7.5.2"
ARG DROP_ACCOUNT_VERSION="2.7.1"

RUN sed -i 's/29,0,16,1/29,0,16,4/' ${BASE_DIR}/version.php
RUN sed -i 's/30,0,13,1/30,0,13,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
@@ -240,7 +240,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!==t.notifications.length,/' ${BASE_DIR}/apps/notifications/js/notifications-src_NotificationsApp_vue.js
RUN sed -i 's/attrs:{id:"notifications",/attrs:{id:"notifications","data-has-notifications":0!==t.notifications.length,/' ${BASE_DIR}/apps/notifications/js/NotificationsApp-atbzHwwu.chunk.mjs

# Rename Memories to Gallery
RUN sed -i 's/<name>Memories<\/name>/<name>Gallery<\/name>/g' ${BASE_DIR}/custom_apps/memories/appinfo/info.xml
@@ -249,14 +249,14 @@ RUN cd ${BASE_DIR}/custom_apps/memories/js && sed -i 's/Memories Settings/Galler

# autocomplete leak tweak apps frontend with sed, disable group suggestion

RUN cd ${BASE_DIR}/custom_apps/contacts && sed -i 's/"GROUP","INDIVIDUAL"/"INDIVIDUAL"/g' js/contacts-main.js
RUN cd ${BASE_DIR}/custom_apps/contacts && sed -i 's/\["INDIVIDUAL"\]/\[\]/g' js/contacts-main.mjs
RUN cd ${BASE_DIR}/custom_apps/calendar && sed -i 's/"GROUP","INDIVIDUAL"/"INDIVIDUAL"/g' js/calendar-main.js
RUN cd ${BASE_DIR}/custom_apps/calendar && sed -i 's/{name:\[a,"displayname"\]},//' js/calendar-main.js
RUN cd ${BASE_DIR}/custom_apps/notes && sed -i 's/<step>OCA\\Notes\\Migration\\EditorHint<\/step>//g' appinfo/info.xml
RUN cd ${BASE_DIR}/apps/theming && sed -i 's/<step>OCA\\Theming\\Migration\\MigrateUserConfig<\/step>//g' appinfo/info.xml

# sharing search by email
RUN cd ${BASE_DIR}/custom_apps/contacts && sed -i 's/kM.principalPropertySearchByDisplayname(t);/kM.principalPropertySearch(\[{name:\["http:\/\/sabredav.org\/ns","email-address"\]\}],t,"anyof");/g' js/contacts-main.js
#RUN cd ${BASE_DIR}/custom_apps/contacts && sed -i 's/kM.principalPropertySearchByDisplayname(t);/kM.principalPropertySearch(\[{name:\["http:\/\/sabredav.org\/ns","email-address"\]\}],t,"anyof");/g' js/contacts-main.js

# Remove colored background from email template logo
RUN sed -i 's/$this->header, \[$this->themingDefaults->getDefaultColorPrimary()/$this->header, \["none"/' ${BASE_DIR}/lib/private/Mail/EMailTemplate.php
@@ -269,7 +269,7 @@ RUN sed -i 's/$this->changeAvatar/\/\/ $this->changeAvatar/' ${BASE_DIR}/custom_
RUN sed -i '/<step>OCA\\DAV\\Migration\\CalDAVRemoveEmptyValue<\/step>/d' ${BASE_DIR}/apps/dav/appinfo/info.xml

# Hide `Play sound when a call started (requires Nextcloud Talk)` checkbox from notification setting
RUN sed -i 's/attrs:{checked:e\.config\.sound_talk}/staticClass:"notification_talk",attrs:{checked:e\.config\.sound_talk}/g' ${BASE_DIR}/apps/notifications/js/notifications-settings.js
RUN sed -i 's/attrs:{checked:r\.config\.sound_talk}/staticClass:"notification_talk",attrs:{checked:r\.config\.sound_talk}/g' ${BASE_DIR}/apps/notifications/js/notifications-settings.mjs

# Hide `Navigation bar settings` from theming
RUN sed -i 's/{attrs:{name:t.t("theming","Navigation bar settings")}}/{staticClass:"navigation-bar-settings",attrs:{name:t.t("theming","Navigation bar settings")}}/g' ${BASE_DIR}/dist/theming-personal-theming.js
+11 −9
Original line number Diff line number Diff line
@@ -9,10 +9,10 @@ only the admin user (also configured in env var) will not have his login appende
diff --git ./core/Controller/LoginController.php ./core/Controller/LoginController-new.php
--- ./core/Controller/LoginController.php	2024-04-26 15:08:54.979407062 +0530
+++ ./core/Controller/LoginController-new.php	2024-04-26 15:16:48.582366408 +0530
@@ -340,6 +340,26 @@
 				$this->l10n->t('Unsupported email length (>255)')
@@ -315,6 +315,27 @@
 			);
 		}
 
+		$user = mb_strtolower($user, 'UTF-8');
+		$actualUser = $user;
+		$legacyDomain = $this->config->getSystemValue('legacy_domain', '');
@@ -33,10 +33,11 @@ diff --git ./core/Controller/LoginController.php ./core/Controller/LoginControll
+		if (!$this->userManager->userExists($user)) {
+			$user = $user . $legacyDomainSuffix;
+		}
 
+
 		$data = new LoginData(
 			$this->request,
@@ -353,7 +373,7 @@
 			$user,
@@ -327,7 +348,7 @@
 		if (!$result->isSuccess()) {
 			return $this->createLoginFailedResponse(
 				$data->getUsername(),
@@ -45,13 +46,13 @@ diff --git ./core/Controller/LoginController.php ./core/Controller/LoginControll
 				$redirect_url,
 				$result->getErrorMessage()
 			);

--- ./core/Controller/WebAuthnController.php	2023-04-21 15:18:58.813220092 +0530
+++ ./core/Controller/WebAuthnController-new.php	2023-04-21 15:24:40.036538414 +0530
@@ -69,6 +69,27 @@
@@ -48,6 +48,27 @@
 
 		$this->logger->debug('Converting login name to UID');
 		$uid = $loginName;
+
+        $uid = trim($uid);
+        $uid = mb_strtolower($uid, 'UTF-8');
+        $legacyDomain = \OC::$server->getConfig()->getSystemValue('legacy_domain', '');
@@ -72,13 +73,14 @@ diff --git ./core/Controller/LoginController.php ./core/Controller/LoginControll
+        if (!\OC::$server->get(\OCP\IUserManager::class)->userExists($uid)) {
+                $uid = $uid . $legacyDomainSuffix;
+        }
+
 		Util::emitHook(
 			'\OCA\Files_Sharing\API\Server2Server',
 			'preLoginNameUsedAsUserName',

--- ./lib/private/User/Session.php	2023-04-21 15:27:00.417034490 +0530
+++ ./lib/private/User/Session-new.php	2023-04-21 15:28:18.309111435 +0530
@@ -413,6 +413,10 @@
@@ -383,6 +383,10 @@
 		$remoteAddress = $request->getRemoteAddress();
 		$currentDelay = $throttler->sleepDelayOrThrowOnMax($remoteAddress, 'login');
 
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ This patch removes the top right icon enabling the global user search function a
diff --git layout.user.php layout.user.php-new
--- ./core/templates/layout.user.php	2023-03-28 14:54:05.873566570 +0530
+++ ./core/templates/layout.user-new.php	2023-03-28 14:54:35.044218831 +0530
@@ -70,7 +70,6 @@
@@ -76,7 +76,6 @@
 			<div class="header-right">
 				<div id="unified-search"></div>
 				<div id="notifications"></div>
+2 −2
Original line number Diff line number Diff line
@@ -7,8 +7,8 @@ This patch removes some results from the contact menu controller, not to leak us
diff --git ContactsMenuController.php ContactsMenuController-new.php
--- ./core/Controller/ContactsMenuController.php	2023-02-01 21:40:07.515628276 +0530
+++ ./core/Controller/ContactsMenuController-new.php	2023-02-01 21:39:07.398140201 +0530
@@ -50,7 +50,7 @@
 	 */
@@ -32,7 +32,7 @@
 	#[NoAdminRequired]
 	#[FrontpageRoute(verb: 'POST', url: '/contactsmenu/contacts')]
 	public function index(?string $filter = null): array {
-		return $this->manager->getEntries($this->userSession->getUser(), $filter);
+4 −4
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ 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
@@ -175,8 +175,8 @@
@@ -150,8 +150,8 @@
 			if (
 				$this->shareeEnumerationFullMatch &&
 				$lowerSearch !== '' && (strtolower($uid) === $lowerSearch ||
@@ -29,7 +29,7 @@ diff --git lib/private/Collaboration/Collaborators/UserPlugin.php lib/private/Co
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
@@ -39,6 +39,7 @@
@@ -19,6 +19,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;
@@ -61,8 +62,10 @@
@@ -42,8 +43,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';
@@ -221,27 +224,61 @@
@@ -204,27 +207,61 @@
 						if ($exactEmailMatch) {
 							$searchResult->markExactIdMatch($emailType);
 						}
Loading