From d97df5785b13c057463bfb3a3ca8c3b686be7174 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 24 Jul 2024 14:23:14 +0530 Subject: [PATCH 01/44] nc 28 image change --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5112e63..1c3ccd3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nextcloud:27.1.8-fpm AS nextcloud +FROM nextcloud:28.0.7-fpm AS nextcloud ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" ARG THEME_HELPER_JOB_ID="881917" @@ -16,7 +16,7 @@ ARG USER_MIGRATION_JOB_ID="881933" ARG MEMORIES_VERSION="6.2.2" ARG DROP_ACCOUNT_VERSION="2.3.2" -RUN sed -i 's/27,1,8,2/27,1,8,4/' ${BASE_DIR}/version.php +RUN sed -i 's/28,0,7,4/28,0,7,5/' ${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 -- GitLab From 0954f528914c485c9062fb9bb929ff7588d81d8b Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 24 Jul 2024 14:27:52 +0530 Subject: [PATCH 02/44] nc 28 image change --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1c3ccd3..59a4400 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nextcloud:28.0.7-fpm AS nextcloud +FROM nextcloud:28.0.8-fpm AS nextcloud ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" ARG THEME_HELPER_JOB_ID="881917" @@ -16,7 +16,7 @@ ARG USER_MIGRATION_JOB_ID="881933" ARG MEMORIES_VERSION="6.2.2" ARG DROP_ACCOUNT_VERSION="2.3.2" -RUN sed -i 's/28,0,7,4/28,0,7,5/' ${BASE_DIR}/version.php +RUN sed -i 's/28,0,8,1/28,0,8,2/' ${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 -- GitLab From 43d7d079a07dd206c68d70d60a863f28118967ba Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Thu, 25 Jul 2024 16:04:06 +0600 Subject: [PATCH 03/44] chore: update apps to support nc-28 --- Dockerfile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 59a4400..a873c78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,20 @@ FROM nextcloud:28.0.8-fpm AS nextcloud ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" -ARG THEME_HELPER_JOB_ID="881917" -ARG NOTES_VERSION="4.9.4" +ARG THEME_HELPER_JOB_ID="969165" +ARG NOTES_VERSION="4.10.1" ARG CONTACTS_JOB_ID="881946" ARG CALENDAR_JOB_ID="872766" -ARG EMAIL_RECOVERY_JOB_ID="940904" -ARG EA_JOB_ID="953602" -ARG LAUNCHER_JOB_ID="881954" +ARG EMAIL_RECOVERY_JOB_ID="969174" +ARG EA_JOB_ID="969184" +ARG LAUNCHER_JOB_ID="969233" ARG GOOGLE_INTEGRATION_VERSION="2.2.0" -ARG DASHBOARD_JOB_ID="881962" -ARG SNAPPY_VERSION="2.36.0" +ARG DASHBOARD_JOB_ID="969242" +ARG SNAPPY_VERSION="2.36.4" ARG SNAPPY_THEME_VERSION="4.0.0" ARG USER_MIGRATION_JOB_ID="881933" -ARG MEMORIES_VERSION="6.2.2" -ARG DROP_ACCOUNT_VERSION="2.3.2" +ARG MEMORIES_VERSION="7.3.1" +ARG DROP_ACCOUNT_VERSION="2.5.0" RUN sed -i 's/28,0,8,1/28,0,8,2/' ${BASE_DIR}/version.php COPY custom_entrypoint.sh / @@ -24,9 +24,9 @@ RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images RUN apt-get update && apt-get install -y unzip ffmpeg RUN curl -fsSL -o notes.tar.gz \ - "https://github.com/nextcloud/notes/releases/download/v${NOTES_VERSION}/notes.tar.gz" && \ tar -xf notes.tar.gz -C ${BASE_DIR}/custom_apps/ && \ rm notes.tar.gz; + "https://github.com/nextcloud-releases/notes/releases/download/v${NOTES_VERSION}/notes-v${NOTES_VERSION}.tar.gz" && \ # custom Contact RUN curl -fsSL -o contacts.zip \ -- GitLab From f7fa8d74f3f08016980813eebe6d448c684b1c01 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Thu, 25 Jul 2024 16:14:55 +0600 Subject: [PATCH 04/44] temp --- Dockerfile | 164 ++++++++++++++++++++++++++--------------------------- 1 file changed, 82 insertions(+), 82 deletions(-) diff --git a/Dockerfile b/Dockerfile index a873c78..8c4b856 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,92 +24,92 @@ RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images RUN apt-get update && apt-get install -y unzip ffmpeg RUN curl -fsSL -o notes.tar.gz \ - tar -xf notes.tar.gz -C ${BASE_DIR}/custom_apps/ && \ - rm notes.tar.gz; "https://github.com/nextcloud-releases/notes/releases/download/v${NOTES_VERSION}/notes-v${NOTES_VERSION}.tar.gz" && \ + tar -xf notes.tar.gz -C ${BASE_DIR}/custom_apps/ && \ + rm notes.tar.gz; # custom Contact RUN curl -fsSL -o contacts.zip \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/contacts/-/jobs/${CONTACTS_JOB_ID}/artifacts/download" && \ - unzip contacts.zip && \ - mv dist/contacts ${BASE_DIR}/custom_apps/ && \ - rm contacts.zip; + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/contacts/-/jobs/${CONTACTS_JOB_ID}/artifacts/download" && \ + unzip contacts.zip && \ + mv dist/contacts ${BASE_DIR}/custom_apps/ && \ + rm contacts.zip; RUN curl -fsSL -o calendar.zip \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/calendar/-/jobs/${CALENDAR_JOB_ID}/artifacts/download" && \ - unzip calendar.zip && \ - mv dist/calendar ${BASE_DIR}/custom_apps/ && \ - rm calendar.zip; + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/calendar/-/jobs/${CALENDAR_JOB_ID}/artifacts/download" && \ + unzip calendar.zip && \ + mv dist/calendar ${BASE_DIR}/custom_apps/ && \ + rm calendar.zip; RUN curl -fsSL -o email-recovery.zip \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/email-recovery/-/jobs/${EMAIL_RECOVERY_JOB_ID}/artifacts/download" && \ - unzip email-recovery.zip && \ - mv dist/email-recovery ${BASE_DIR}/custom_apps/ && \ - rm email-recovery.zip; + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/email-recovery/-/jobs/${EMAIL_RECOVERY_JOB_ID}/artifacts/download" && \ + unzip email-recovery.zip && \ + mv dist/email-recovery ${BASE_DIR}/custom_apps/ && \ + rm email-recovery.zip; RUN curl -fsSL -o ecloud-theme-helper.zip \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/ecloud-theme-helper/-/jobs/${THEME_HELPER_JOB_ID}/artifacts/download" && \ - unzip ecloud-theme-helper.zip && \ - mv dist/ecloud-theme-helper ${BASE_DIR}/custom_apps/ && \ - rm ecloud-theme-helper.zip; + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/ecloud-theme-helper/-/jobs/${THEME_HELPER_JOB_ID}/artifacts/download" && \ + unzip ecloud-theme-helper.zip && \ + mv dist/ecloud-theme-helper ${BASE_DIR}/custom_apps/ && \ + rm ecloud-theme-helper.zip; RUN curl -fsSL -o murena_launcher.zip \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/launcher/-/jobs/${LAUNCHER_JOB_ID}/artifacts/download" && \ - unzip murena_launcher.zip && \ - mv dist/murena_launcher ${BASE_DIR}/custom_apps/ && \ - rm murena_launcher.zip; + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/launcher/-/jobs/${LAUNCHER_JOB_ID}/artifacts/download" && \ + unzip murena_launcher.zip && \ + mv dist/murena_launcher ${BASE_DIR}/custom_apps/ && \ + rm murena_launcher.zip; RUN curl -fsSL -o integration_google.tar.gz \ - "https://github.com/nextcloud-releases/integration_google/releases/download/v${GOOGLE_INTEGRATION_VERSION}/integration_google-v${GOOGLE_INTEGRATION_VERSION}.tar.gz" && \ - tar -xf integration_google.tar.gz -C ${BASE_DIR}/custom_apps/ && \ - chown -R www-data:www-data ${BASE_DIR}/custom_apps/integration_google && \ - rm integration_google.tar.gz; + "https://github.com/nextcloud-releases/integration_google/releases/download/v${GOOGLE_INTEGRATION_VERSION}/integration_google-v${GOOGLE_INTEGRATION_VERSION}.tar.gz" && \ + tar -xf integration_google.tar.gz -C ${BASE_DIR}/custom_apps/ && \ + chown -R www-data:www-data ${BASE_DIR}/custom_apps/integration_google && \ + rm integration_google.tar.gz; RUN curl -fsSL -o ecloud-accounts.zip \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/ecloud-accounts/-/jobs/${EA_JOB_ID}/artifacts/download" && \ - unzip ecloud-accounts.zip && \ - mv dist/ecloud-accounts ${BASE_DIR}/custom_apps/ && \ - rm ecloud-accounts.zip; + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/ecloud-accounts/-/jobs/${EA_JOB_ID}/artifacts/download" && \ + unzip ecloud-accounts.zip && \ + mv dist/ecloud-accounts ${BASE_DIR}/custom_apps/ && \ + rm ecloud-accounts.zip; RUN curl -fsSL -o ecloud-dashboard.zip \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/murena-dashboard/-/jobs/${DASHBOARD_JOB_ID}/artifacts/download" && \ - unzip ecloud-dashboard.zip && \ - mv dist/murena-dashboard ${BASE_DIR}/custom_apps/ && \ - rm ecloud-dashboard.zip; + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/murena-dashboard/-/jobs/${DASHBOARD_JOB_ID}/artifacts/download" && \ + unzip ecloud-dashboard.zip && \ + mv dist/murena-dashboard ${BASE_DIR}/custom_apps/ && \ + rm ecloud-dashboard.zip; RUN curl -fsSL -o snappymail.tar.gz \ - "https://snappymail.eu/repository/nextcloud/snappymail-${SNAPPY_VERSION}-nextcloud.tar.gz" && \ - tar -xf snappymail.tar.gz -C ${BASE_DIR}/custom_apps/ && \ - rm snappymail.tar.gz; + "https://snappymail.eu/repository/nextcloud/snappymail-${SNAPPY_VERSION}-nextcloud.tar.gz" && \ + tar -xf snappymail.tar.gz -C ${BASE_DIR}/custom_apps/ && \ + rm snappymail.tar.gz; RUN curl -fsSL -o user_migration.zip \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/user_migration/-/jobs/${USER_MIGRATION_JOB_ID}/artifacts/download" && \ - unzip user_migration.zip && \ - mv dist/user_migration ${BASE_DIR}/custom_apps/ && \ - rm user_migration.zip; + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/user_migration/-/jobs/${USER_MIGRATION_JOB_ID}/artifacts/download" && \ + unzip user_migration.zip && \ + mv dist/user_migration ${BASE_DIR}/custom_apps/ && \ + rm user_migration.zip; # Fix snappymail icon RUN sed -i 's/logo-white-64x64.png/app.svg/' ${BASE_DIR}/custom_apps/snappymail/appinfo/info.xml # Snappy theme RUN curl -fsSL -o Murena-snappymail-theme.tar.gz \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/snappymail-theme/-/archive/${SNAPPY_THEME_VERSION}/snappymail-theme-${SNAPPY_THEME_VERSION}.tar.gz" && \ - tar -xf Murena-snappymail-theme.tar.gz -C /tmp/ && \ - mkdir -p ${BASE_DIR}/themes/Murena && \ - mv /tmp/snappymail-theme-${SNAPPY_THEME_VERSION}/ ${BASE_DIR}/themes/Murena/snappymail && \ - chown -R www-data:www-data ${BASE_DIR}/themes/Murena/ && \ - rm -rf Murena-snappymail-theme.tar.gz + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/snappymail-theme/-/archive/${SNAPPY_THEME_VERSION}/snappymail-theme-${SNAPPY_THEME_VERSION}.tar.gz" && \ + tar -xf Murena-snappymail-theme.tar.gz -C /tmp/ && \ + mkdir -p ${BASE_DIR}/themes/Murena && \ + mv /tmp/snappymail-theme-${SNAPPY_THEME_VERSION}/ ${BASE_DIR}/themes/Murena/snappymail && \ + chown -R www-data:www-data ${BASE_DIR}/themes/Murena/ && \ + rm -rf Murena-snappymail-theme.tar.gz RUN curl -fsSL -o memories.tar.gz \ - "https://github.com/pulsejet/memories/releases/download/v${MEMORIES_VERSION}/memories.tar.gz" && \ - tar -xf memories.tar.gz -C ${BASE_DIR}/custom_apps/ && \ - rm memories.tar.gz; + "https://github.com/pulsejet/memories/releases/download/v${MEMORIES_VERSION}/memories.tar.gz" && \ + tar -xf memories.tar.gz -C ${BASE_DIR}/custom_apps/ && \ + rm memories.tar.gz; RUN curl -fsSL -o drop_account.tar.gz \ - "https://packages.framasoft.org/projects/nextcloud-apps/drop-account/drop_account-${DROP_ACCOUNT_VERSION}.tar.gz" && \ - tar -xf drop_account.tar.gz -C ${BASE_DIR}/custom_apps/ && \ - rm drop_account.tar.gz; + "https://packages.framasoft.org/projects/nextcloud-apps/drop-account/drop_account-${DROP_ACCOUNT_VERSION}.tar.gz" && \ + tar -xf drop_account.tar.gz -C ${BASE_DIR}/custom_apps/ && \ + rm drop_account.tar.gz; @@ -156,27 +156,27 @@ RUN rm -rf ${TMP_PATCH_DIR} # Custom theme RUN curl -fsSL -o eCloud-theme.tar.gz \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/nextcloud-theme/-/archive/${THEME_VERSION}/nextcloud-theme-${THEME_VERSION}.tar.gz" && \ - tar -xf eCloud-theme.tar.gz -C /tmp/ && \ - mv /tmp/nextcloud-theme-${THEME_VERSION}/ ${BASE_DIR}/themes/eCloud && \ - chown -R www-data:www-data ${BASE_DIR}/themes/eCloud/ && \ - rm -rf eCloud-theme.tar.gz ${BASE_DIR}/themes/example/ + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/nextcloud-theme/-/archive/${THEME_VERSION}/nextcloud-theme-${THEME_VERSION}.tar.gz" && \ + tar -xf eCloud-theme.tar.gz -C /tmp/ && \ + mv /tmp/nextcloud-theme-${THEME_VERSION}/ ${BASE_DIR}/themes/eCloud && \ + chown -R www-data:www-data ${BASE_DIR}/themes/eCloud/ && \ + rm -rf eCloud-theme.tar.gz ${BASE_DIR}/themes/example/ # User Backend RUN curl -fsSL -o user_backend_sql_raw.tar.gz \ - "https://github.com/PanCakeConnaisseur/user_backend_sql_raw/releases/download/v${USER_BACKEND_RAW_SQL_VERSION}/user_backend_sql_raw.tar.gz" && \ - tar -xf user_backend_sql_raw.tar.gz -C ${BASE_DIR}/custom_apps/ && \ - rm user_backend_sql_raw.tar.gz; + "https://github.com/PanCakeConnaisseur/user_backend_sql_raw/releases/download/v${USER_BACKEND_RAW_SQL_VERSION}/user_backend_sql_raw.tar.gz" && \ + tar -xf user_backend_sql_raw.tar.gz -C ${BASE_DIR}/custom_apps/ && \ + rm user_backend_sql_raw.tar.gz; # Selfhost theme RUN if [ "$IS_SELFHOST" = true ]; then \ - curl -fsSL -o selfhost-theme-helper.tar.gz \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/selfhost-theme-helper/-/archive/${SELFHOST_THEME_VERSION}/selfhost-theme-helper-${SELFHOST_THEME_VERSION}.tar.gz" && \ - tar -xf selfhost-theme-helper.tar.gz -C /tmp/ && \ - mv /tmp/selfhost-theme-helper-${SELFHOST_THEME_VERSION}/ ${BASE_DIR}/custom_apps/selfhost-theme-helper && \ - chown -R www-data:www-data ${BASE_DIR}/custom_apps/selfhost-theme-helper/ && \ - rm -f selfhost-theme-helper.tar.gz;\ - fi + curl -fsSL -o selfhost-theme-helper.tar.gz \ + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/selfhost-theme-helper/-/archive/${SELFHOST_THEME_VERSION}/selfhost-theme-helper-${SELFHOST_THEME_VERSION}.tar.gz" && \ + tar -xf selfhost-theme-helper.tar.gz -C /tmp/ && \ + mv /tmp/selfhost-theme-helper-${SELFHOST_THEME_VERSION}/ ${BASE_DIR}/custom_apps/selfhost-theme-helper && \ + chown -R www-data:www-data ${BASE_DIR}/custom_apps/selfhost-theme-helper/ && \ + rm -f selfhost-theme-helper.tar.gz;\ + fi @@ -207,14 +207,14 @@ ARG OIDC_LOGIN_VERSION="3.0.2" ARG IS_SELFHOST=false 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-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 + "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 RUN curl -fsSL -o oidc_login.tar.gz \ - "https://github.com/pulsejet/nextcloud-oidc-login/releases/download/v${OIDC_LOGIN_VERSION}/oidc_login.tar.gz" && \ - tar -xf oidc_login.tar.gz -C ${BASE_DIR}/custom_apps && \ - rm oidc_login.tar.gz + "https://github.com/pulsejet/nextcloud-oidc-login/releases/download/v${OIDC_LOGIN_VERSION}/oidc_login.tar.gz" && \ + tar -xf oidc_login.tar.gz -C ${BASE_DIR}/custom_apps && \ + rm oidc_login.tar.gz # Patches COPY patches/ ${TMP_PATCH_DIR}/ @@ -278,17 +278,17 @@ RUN sed -i '/OCA\\DAV\\Migration\\CalDAVRemoveEmptyValue<\/step>/d' ${BASE # Custom theme RUN rm -rf ${BASE_DIR}/themes/eCloud && \ - curl -fsSL -o eCloud-theme.tar.gz \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/nextcloud-theme/-/archive/${THEME_VERSION}/nextcloud-theme-${THEME_VERSION}.tar.gz" && \ - tar -xf eCloud-theme.tar.gz -C /tmp/ && \ - mv /tmp/nextcloud-theme-${THEME_VERSION}/ ${BASE_DIR}/themes/eCloud && \ - chown -R www-data:www-data ${BASE_DIR}/themes/eCloud/ && \ - rm -rf eCloud-theme.tar.gz ${BASE_DIR}/themes/example/ + curl -fsSL -o eCloud-theme.tar.gz \ + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/nextcloud-theme/-/archive/${THEME_VERSION}/nextcloud-theme-${THEME_VERSION}.tar.gz" && \ + tar -xf eCloud-theme.tar.gz -C /tmp/ && \ + mv /tmp/nextcloud-theme-${THEME_VERSION}/ ${BASE_DIR}/themes/eCloud && \ + chown -R www-data:www-data ${BASE_DIR}/themes/eCloud/ && \ + rm -rf eCloud-theme.tar.gz ${BASE_DIR}/themes/example/ # Remove Selfhost theme RUN if [ "$IS_SELFHOST" = false ]; then \ - rm -rf ${BASE_DIR}/custom_apps/selfhost-theme-helper;\ - fi + rm -rf ${BASE_DIR}/custom_apps/selfhost-theme-helper;\ + fi # Seds to fix displayname save regression RUN sed -i "s/'email' ||/'email'/" ${BASE_DIR}/apps/settings/js/federationsettingsview.js -- GitLab From cfcabe597dcc382915065791aa0873edbbc708b4 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Thu, 25 Jul 2024 20:48:53 +0530 Subject: [PATCH 05/44] fix patches --- Dockerfile | 6 +- patches/005-autocomplete-user-leak-core.patch | 116 ++++++++-------- patches/009-help-links.patch | 128 ++++++++++-------- .../013-revert-token-password-update.patch | 16 +-- patches/014-add-mail-usage.patch | 22 +-- patches/016-login-screen.patch | 76 ++++++----- patches/026-primary-color-fix.patch | 16 +-- .../031-theme-custom-app-translations.patch | 9 +- patches/033-verification-token-private.patch | 15 +- 9 files changed, 205 insertions(+), 199 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8c4b856..118c1e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -140,7 +140,7 @@ RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/006-recovery-email-changes.pa RUN patch -u ${BASE_DIR}/apps/settings/lib/Settings/Personal/ServerDevNotice.php -i ${TMP_PATCH_DIR}/007-remove-dev-notice.patch RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/009-help-links.patch RUN patch -u ${BASE_DIR}/lib/private/Updater.php -i ${TMP_PATCH_DIR}/010-disable-app-store-upgrade.patch -RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/011-privacy-settings.patch +#RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/011-privacy-settings.patch -commented for testing RUN patch -u ${BASE_DIR}/lib/private/Authentication/Token/PublicKeyTokenProvider.php -i ${TMP_PATCH_DIR}/013-revert-token-password-update.patch RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/014-add-mail-usage.patch RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/015-email-mail-template.patch @@ -246,9 +246,9 @@ RUN sed -i 's/https:\/\/nextcloud.com\/signup\//https:\/\/e\.foundation\/registerAlternativeLogin(OIDCLoginOption::class);/\/\/$context->registerAlternativeLogin(OIDCLoginOption::class);/' ${BASE_DIR}/custom_apps/oidc_login/lib/AppInfo/Application.php # 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-node_modules_moment_locale_sync_recursive_-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/notifications-node_modules_moment_locale_sync_recursive_-src_NotificationsApp_vue.js # Add data-object-type to notification -RUN sed -i 's/"data-id":t.notificationId,/"data-id":t.notificationId,"data-object-type":t.objectType,/' ${BASE_DIR}/apps/notifications/js/notifications-node_modules_moment_locale_sync_recursive_-src_NotificationsApp_vue.js +#RUN sed -i 's/"data-id":t.notificationId,/"data-id":t.notificationId,"data-object-type":t.objectType,/' ${BASE_DIR}/apps/notifications/js/notifications-node_modules_moment_locale_sync_recursive_-src_NotificationsApp_vue.js # 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 a1a781a..8fed793 100644 --- a/patches/005-autocomplete-user-leak-core.patch +++ b/patches/005-autocomplete-user-leak-core.patch @@ -33,31 +33,23 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co +++ lib/private/Collaboration/Collaborators/MailPlugin-new.php 2023-02-01 21:51:00.382603635 +0530 @@ -39,6 +39,7 @@ use OCP\IUserSession; - use OCP\Share\IShare; use OCP\Mail\IMailer; + use OCP\Share\IShare; +use OCP\IUserManager; class MailPlugin implements ISearchPlugin { - /* @var bool */ -@@ -76,7 +77,8 @@ - IGroupManager $groupManager, - KnownUserService $knownUserService, - IUserSession $userSession, -- IMailer $mailer) { -+ IMailer $mailer, -+ IUserManager $userManager) { - $this->contactsManager = $contactsManager; - $this->cloudIdManager = $cloudIdManager; - $this->config = $config; -@@ -84,6 +86,7 @@ - $this->knownUserService = $knownUserService; - $this->userSession = $userSession; - $this->mailer = $mailer; + protected bool $shareWithGroupOnly; +@@ -61,7 +62,9 @@ + private KnownUserService $knownUserService, + private IUserSession $userSession, + private IMailer $mailer, ++ private IUserManager $userManager, + ) { + $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'; -@@ -230,27 +233,61 @@ + $this->shareeEnumerationInGroupOnly = $this->shareeEnumeration && $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no') === 'yes'; +@@ -207,27 +210,61 @@ if ($exactEmailMatch) { $searchResult->markExactIdMatch($emailType); } @@ -74,29 +66,29 @@ 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, ++ ], ++ ]; ++ } else { ++ // /e/ user IS an ecloud user, convert to user share type ++ if (!$isUserinInstance->isEnabled()) { ++ // Ignore disabled users ++ continue; ++ } + $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()) { -+ // Ignore disabled users -+ continue; -+ } -+ $result['exact'][] = [ -+ 'label' => $displayName, -+ 'value' => [ -+ 'shareType' => IShare::TYPE_USER, -+ 'shareWith' => $emailAddress, -+ ], -+ ]; ++ 'value' => [ ++ 'shareType' => IShare::TYPE_USER, ++ 'shareWith' => $emailAddress, ++ ], ++ ]; + } } else { - $result['wide'][] = [ @@ -111,30 +103,30 @@ 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/009-help-links.patch b/patches/009-help-links.patch index c0e7cbf..90142b7 100644 --- a/patches/009-help-links.patch +++ b/patches/009-help-links.patch @@ -5,70 +5,82 @@ Subject: [PATCH] Changes help links to point to the correct links This patch adds changes to the "Settings" app's help template, controller and stylesheet to make sure the correct help links are shown ---- ./apps/settings/lib/Controller/HelpController.php 2023-02-01 18:59:44.491700506 +0530 -+++ ./apps/settings/lib/Controller/HelpController-new.php 2023-02-01 21:01:10.933837383 +0530 -@@ -98,6 +98,7 @@ +--- ./apps/settings/lib/Controller/HelpController.php 2024-07-25 16:11:57 +0530 ++++ ./apps/settings/lib/Controller/HelpController-new.php 2024-07-25 16:12:51 +0530 +@@ -114,6 +114,7 @@ 'urlAdminDocs' => $urlAdminDocs, 'mode' => $mode, 'pageTitle' => $pageTitle, + 'ncVersion' => \OCP\Util::getVersion()[0], + 'knowledgebaseEmbedded' => $knowledgebaseEmbedded, ]); - $policy = new ContentSecurityPolicy(); - $policy->addAllowedFrameDomain('\'self\''); ---- ./apps/settings/templates/help.php 2023-02-01 20:49:47.625123858 +0530 -+++ ./apps/settings/templates/help-new.php 2023-02-01 20:55:46.533199855 +0530 -@@ -4,45 +4,26 @@ - + +-
+- +-
+ +
+
--- ./apps/settings/css/help.css 2021-08-20 14:16:57.951439620 +0530 +++ ./apps/settings/css/help-new.css 2021-08-20 17:02:43.549016337 +0530 diff --git a/patches/013-revert-token-password-update.patch b/patches/013-revert-token-password-update.patch index c043207..dd8278b 100644 --- a/patches/013-revert-token-password-update.patch +++ b/patches/013-revert-token-password-update.patch @@ -5,17 +5,17 @@ Subject: [PATCH] Reverts token password update on each login NC 21 started updating password of each and every token on each login. This introduces a huge load on database. This patch reverts to only update when there are expired tokens. ---- ./lib/private/Authentication/Token/PublicKeyTokenProvider.php 2021-11-16 01:32:54.000000000 +0530 -+++ ./lib/private/Authentication/Token/PublicKeyTokenProvider-new.php 2021-12-16 17:13:48.893560398 +0530 -@@ -414,6 +414,11 @@ - public function updatePasswords(string $uid, string $password) { - $this->cache->clear(); +--- ./lib/private/Authentication/Token/PublicKeyTokenProvider.php 2024-07-25 17:51:37 +0530 ++++ ./lib/private/Authentication/Token/PublicKeyTokenProvider-new.php 2024-07-25 17:53:16 +0530 +@@ -509,6 +509,11 @@ + } + public function updatePasswords(string $uid, string $password) { ++ + if (!$this->mapper->hasExpiredTokens($uid)) { + // Nothing to do here + return; -+ } -+ ++ } // prevent setting an empty pw as result of pw-less-login - if ($password === '') { + if ($password === '' || !$this->config->getSystemValueBool('auth.storeCryptedPassword', true)) { return; diff --git a/patches/014-add-mail-usage.patch b/patches/014-add-mail-usage.patch index 6710985..2ccfa97 100644 --- a/patches/014-add-mail-usage.patch +++ b/patches/014-add-mail-usage.patch @@ -1,6 +1,6 @@ --- 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 @@ +@@ -542,6 +542,12 @@ } try { $free = $sourceStorage->free_space($rootInfo->getInternalPath()); @@ -8,17 +8,17 @@ + $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 @@ ++ $used = $used + $mailQuotaUsage; ++ } + if (is_bool($free)) { + $free = 0.0; + } +@@ -571,8 +577,6 @@ $relative = 0; } - + +- /** @var string $ownerId */ - $ownerId = $storage->getOwner($path); -+ $ownerDisplayName = ''; - $owner = \OC::$server->getUserManager()->get($ownerId); - if ($owner) { \ No newline at end of file + if ($ownerId) { + $ownerDisplayName = \OC::$server->getUserManager()->getDisplayName($ownerId) ?? ''; \ No newline at end of file diff --git a/patches/016-login-screen.patch b/patches/016-login-screen.patch index 524c56d..9395292 100644 --- a/patches/016-login-screen.patch +++ b/patches/016-login-screen.patch @@ -1,5 +1,7 @@ --- ./core/templates/layout.guest.php 2024-03-15 19:20:21 +++ ./core/templates/layout.guest-new.php 2024-03-15 19:24:49 +--- layout.guest.php 2024-07-25 19:23:57 ++++ layout.guest-new.php 2024-07-25 19:34:27 @@ -22,6 +22,7 @@ @@ -8,7 +10,6 @@ -\ No newline at end of file @@ -30,12 +31,37 @@ $initialState) { ?> @@ -16,30 +17,30 @@ -
-
+
" > -+ -+