Loading Dockerfile +5 −0 Original line number Diff line number Diff line Loading @@ -236,6 +236,11 @@ RUN patch -u ${BASE_DIR}/lib/private/AppFramework/Middleware/Security/CORSMiddle #fixed regression in generic event type for nextcloud 28.0.9 RUN patch -u ${BASE_DIR}/apps/dav/lib/AppInfo/Application.php -i ${TMP_PATCH_DIR}/038-generic-event-fix.patch #commenting code to re-enable account creation RUN patch -u ${BASE_DIR}/lib/private/User/Session.php -i ${TMP_PATCH_DIR}/039-reenable-ac-comment-setupfs.patch RUN patch -u ${BASE_DIR}/lib/base.php -i ${TMP_PATCH_DIR}/040-reenable-ac-comment-exception.patch RUN patch -u ${BASE_DIR}/lib/private/Lockdown/LockdownManager.php -i ${TMP_PATCH_DIR}/041-return-false-canfilesystem.patch RUN rm -rf ${TMP_PATCH_DIR} Loading patches/039-reenable-ac-comment-setupfs.patch 0 → 100644 +33 −0 Original line number Diff line number Diff line From: Ronak Patel <ronak.patel.ext@murena.com> Date: Mon, 09 Dec 2024 18:50:00 +0530 Subject: [PATCH] Enabling account creation (by commenting) which does not check FS for first-time login --- ./lib/private/User/Session.php 2024-12-09 16:26:24.610444326 +0000 +++ ./lib/private/User/Session-new.php 2024-09-09 11:44:00.399364921 +0000 @@ -542,19 +542,19 @@ if ($firstTimeLogin) { //we need to pass the user name, which may differ from login name - $user = $this->getUser()->getUID(); - OC_Util::setupFS($user); + //$user = $this->getUser()->getUID(); + //OC_Util::setupFS($user); // TODO: lock necessary? //trigger creation of user home and /files folder - $userFolder = \OC::$server->getUserFolder($user); + //$userFolder = \OC::$server->getUserFolder($user); - try { + //try { // copy skeleton - \OC_Util::copySkeleton($user, $userFolder); - } catch (NotPermittedException $ex) { + // \OC_Util::copySkeleton($user, $userFolder); + //} catch (NotPermittedException $ex) { // read only uses - } + //} // trigger any other initialization \OC::$server->get(IEventDispatcher::class)->dispatch(IUser::class . '::firstLogin', new GenericEvent($this->getUser())); No newline at end of file patches/040-reenable-ac-comment-exception.patch 0 → 100644 +21 −0 Original line number Diff line number Diff line From: Ronak Patel <ronak.patel.ext@murena.com> Date: Mon, 09 Dec 2024 18:50:00 +0530 Subject: [PATCH] Enabling account creation: Comment exception for cache gc --- ./lib/base.php 2024-12-09 16:25:48.446616914 +0000 +++ ./lib/base-new.php 2024-12-09 11:51:21.916843879 +0000 @@ -884,10 +884,10 @@ } catch (\Exception $e) { // a GC exception should not prevent users from using OC, // so log the exception - Server::get(LoggerInterface::class)->warning('Exception when running cache gc.', [ - 'app' => 'core', - 'exception' => $e, - ]); + //Server::get(LoggerInterface::class)->warning('Exception when running cache gc.', [ + // 'app' => 'core', + // 'exception' => $e, + //]); } }); } No newline at end of file patches/041-return-false-canfilesystem.patch 0 → 100644 +15 −0 Original line number Diff line number Diff line From: Ronak Patel <ronak.patel.ext@murena.com> Date: Mon, 16 Dec 2024 18:50:00 +0530 Subject: [PATCH] Disabling access file system --- ./lib/private/Lockdown/LockdownManager.php 2023-12-16 15:01:25 +++ ./lib/private/Lockdown/LockdownManager-new.php 2024-12-16 13:31:40 @@ -77,6 +77,7 @@ } public function canAccessFilesystem() { + return false; $scope = $this->getScopeAsArray(); return !$scope || $scope['filesystem']; } Loading
Dockerfile +5 −0 Original line number Diff line number Diff line Loading @@ -236,6 +236,11 @@ RUN patch -u ${BASE_DIR}/lib/private/AppFramework/Middleware/Security/CORSMiddle #fixed regression in generic event type for nextcloud 28.0.9 RUN patch -u ${BASE_DIR}/apps/dav/lib/AppInfo/Application.php -i ${TMP_PATCH_DIR}/038-generic-event-fix.patch #commenting code to re-enable account creation RUN patch -u ${BASE_DIR}/lib/private/User/Session.php -i ${TMP_PATCH_DIR}/039-reenable-ac-comment-setupfs.patch RUN patch -u ${BASE_DIR}/lib/base.php -i ${TMP_PATCH_DIR}/040-reenable-ac-comment-exception.patch RUN patch -u ${BASE_DIR}/lib/private/Lockdown/LockdownManager.php -i ${TMP_PATCH_DIR}/041-return-false-canfilesystem.patch RUN rm -rf ${TMP_PATCH_DIR} Loading
patches/039-reenable-ac-comment-setupfs.patch 0 → 100644 +33 −0 Original line number Diff line number Diff line From: Ronak Patel <ronak.patel.ext@murena.com> Date: Mon, 09 Dec 2024 18:50:00 +0530 Subject: [PATCH] Enabling account creation (by commenting) which does not check FS for first-time login --- ./lib/private/User/Session.php 2024-12-09 16:26:24.610444326 +0000 +++ ./lib/private/User/Session-new.php 2024-09-09 11:44:00.399364921 +0000 @@ -542,19 +542,19 @@ if ($firstTimeLogin) { //we need to pass the user name, which may differ from login name - $user = $this->getUser()->getUID(); - OC_Util::setupFS($user); + //$user = $this->getUser()->getUID(); + //OC_Util::setupFS($user); // TODO: lock necessary? //trigger creation of user home and /files folder - $userFolder = \OC::$server->getUserFolder($user); + //$userFolder = \OC::$server->getUserFolder($user); - try { + //try { // copy skeleton - \OC_Util::copySkeleton($user, $userFolder); - } catch (NotPermittedException $ex) { + // \OC_Util::copySkeleton($user, $userFolder); + //} catch (NotPermittedException $ex) { // read only uses - } + //} // trigger any other initialization \OC::$server->get(IEventDispatcher::class)->dispatch(IUser::class . '::firstLogin', new GenericEvent($this->getUser())); No newline at end of file
patches/040-reenable-ac-comment-exception.patch 0 → 100644 +21 −0 Original line number Diff line number Diff line From: Ronak Patel <ronak.patel.ext@murena.com> Date: Mon, 09 Dec 2024 18:50:00 +0530 Subject: [PATCH] Enabling account creation: Comment exception for cache gc --- ./lib/base.php 2024-12-09 16:25:48.446616914 +0000 +++ ./lib/base-new.php 2024-12-09 11:51:21.916843879 +0000 @@ -884,10 +884,10 @@ } catch (\Exception $e) { // a GC exception should not prevent users from using OC, // so log the exception - Server::get(LoggerInterface::class)->warning('Exception when running cache gc.', [ - 'app' => 'core', - 'exception' => $e, - ]); + //Server::get(LoggerInterface::class)->warning('Exception when running cache gc.', [ + // 'app' => 'core', + // 'exception' => $e, + //]); } }); } No newline at end of file
patches/041-return-false-canfilesystem.patch 0 → 100644 +15 −0 Original line number Diff line number Diff line From: Ronak Patel <ronak.patel.ext@murena.com> Date: Mon, 16 Dec 2024 18:50:00 +0530 Subject: [PATCH] Disabling access file system --- ./lib/private/Lockdown/LockdownManager.php 2023-12-16 15:01:25 +++ ./lib/private/Lockdown/LockdownManager-new.php 2024-12-16 13:31:40 @@ -77,6 +77,7 @@ } public function canAccessFilesystem() { + return false; $scope = $this->getScopeAsArray(); return !$scope || $scope['filesystem']; }