From 4b3e0805a494675adff48f80a61846e41f4aa35a Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 23 Mar 2025 04:06:35 -0600 Subject: [PATCH] chore: Update dependencies and clean up code formatting - Downgraded '@trpc/server' version in package.json and pnpm-lock.yaml to match other TRPC packages. - Removed unused dependencies 'node-fetch', 'data-uri-to-buffer', 'fetch-blob', and 'formdata-polyfill' from pnpm-lock.yaml and package.json. - Improved code formatting in various components for better readability, including adjustments in 'edit-gitea-provider.tsx' and 'security-audit.tsx'. - Refactored imports in 'auth.ts' for better organization and clarity. --- .../git/gitea/edit-gitea-provider.tsx | 8 +++- .../settings/servers/security-audit.tsx | 19 +++++--- apps/dokploy/package.json | 5 +- packages/server/src/lib/auth.ts | 48 +++++++++---------- packages/server/src/setup/server-audit.ts | 2 +- packages/server/src/utils/providers/gitea.ts | 6 +-- pnpm-lock.yaml | 40 +--------------- 7 files changed, 51 insertions(+), 77 deletions(-) diff --git a/apps/dokploy/components/dashboard/settings/git/gitea/edit-gitea-provider.tsx b/apps/dokploy/components/dashboard/settings/git/gitea/edit-gitea-provider.tsx index 5d2f92d5..ba48274a 100644 --- a/apps/dokploy/components/dashboard/settings/git/gitea/edit-gitea-provider.tsx +++ b/apps/dokploy/components/dashboard/settings/git/gitea/edit-gitea-provider.tsx @@ -201,7 +201,11 @@ export const EditGiteaProvider = ({ giteaId }: Props) => { Name - + @@ -289,4 +293,4 @@ export const EditGiteaProvider = ({ giteaId }: Props) => { ); -}; \ No newline at end of file +}; diff --git a/apps/dokploy/components/dashboard/settings/servers/security-audit.tsx b/apps/dokploy/components/dashboard/settings/servers/security-audit.tsx index bf1f74c3..98f56d93 100644 --- a/apps/dokploy/components/dashboard/settings/servers/security-audit.tsx +++ b/apps/dokploy/components/dashboard/settings/servers/security-audit.tsx @@ -26,16 +26,21 @@ export const SecurityAudit = ({ serverId }: Props) => { }, ); const _utils = api.useUtils(); - + // Helper function to check if root login is securely configured const isRootLoginSecure = () => { if (!data?.ssh?.permitRootLogin) return false; - + // These are secure options for PermitRootLogin - const secureOptions = ['no', 'prohibit-password', 'without-password', 'forced-commands-only']; + const secureOptions = [ + "no", + "prohibit-password", + "without-password", + "forced-commands-only", + ]; return secureOptions.includes(data.ssh.permitRootLogin); }; - + return (
@@ -49,7 +54,9 @@ export const SecurityAudit = ({ serverId }: Props) => { Setup Security Suggestions
- Check the security suggestions + + Check the security suggestions +