Merge pull request #1360 from Dokploy/remove-permit-root-login-advice

Remove permit root login advice
This commit is contained in:
Mauricio Siu
2025-02-23 18:11:58 -06:00
committed by GitHub
4 changed files with 53 additions and 63 deletions

View File

@@ -35,34 +35,34 @@ export function TerminalLine({ log, noTimestamp, searchTerm }: LogLineProps) {
})
: "--- No time found ---";
const highlightMessage = (text: string, term: string) => {
if (!term) {
return (
<span
className="transition-colors"
dangerouslySetInnerHTML={{
__html: fancyAnsi.toHtml(text),
}}
/>
);
}
const htmlContent = fancyAnsi.toHtml(text);
const searchRegex = new RegExp(`(${escapeRegExp(term)})`, "gi");
const modifiedContent = htmlContent.replace(
searchRegex,
(match) =>
`<span class="bg-orange-200/80 dark:bg-orange-900/80 font-bold">${match}</span>`,
);
const highlightMessage = (text: string, term: string) => {
if (!term) {
return (
<span
className="transition-colors"
dangerouslySetInnerHTML={{ __html: modifiedContent }}
dangerouslySetInnerHTML={{
__html: fancyAnsi.toHtml(text),
}}
/>
);
};
}
const htmlContent = fancyAnsi.toHtml(text);
const searchRegex = new RegExp(`(${escapeRegExp(term)})`, "gi");
const modifiedContent = htmlContent.replace(
searchRegex,
(match) =>
`<span class="bg-orange-200/80 dark:bg-orange-900/80 font-bold">${match}</span>`,
);
return (
<span
className="transition-colors"
dangerouslySetInnerHTML={{ __html: modifiedContent }}
/>
);
};
const tooltip = (color: string, timestamp: string | null) => {
const square = (

View File

@@ -145,15 +145,6 @@ export const SecurityAudit = ({ serverId }: Props) => {
: "Enabled (Password Authentication should be disabled)"
}
/>
<StatusRow
label="Permit Root Login"
isEnabled={data?.ssh.permitRootLogin === "no"}
description={
data?.ssh.permitRootLogin === "no"
? "Disabled (Recommended)"
: `Enabled: ${data?.ssh.permitRootLogin} (Root Login should be disabled)`
}
/>
<StatusRow
label="Use PAM"
isEnabled={data?.ssh.usePam === "no"}

View File

@@ -1,38 +1,38 @@
import {
type DomainSchema,
type Schema,
type Template,
generateRandomDomain,
type DomainSchema,
type Schema,
type Template,
generateRandomDomain,
} from "../utils";
export function generate(schema: Schema): Template {
const dashboardDomain = generateRandomDomain(schema);
const backendDomain = generateRandomDomain(schema);
const actionsDomain = generateRandomDomain(schema);
const dashboardDomain = generateRandomDomain(schema);
const backendDomain = generateRandomDomain(schema);
const actionsDomain = generateRandomDomain(schema);
const domains: DomainSchema[] = [
{
host: dashboardDomain,
port: 6791,
serviceName: "dashboard",
},
{
host: backendDomain,
port: 3210,
serviceName: "backend",
},
{
host: actionsDomain,
port: 3211,
serviceName: "backend",
},
];
const domains: DomainSchema[] = [
{
host: dashboardDomain,
port: 6791,
serviceName: "dashboard",
},
{
host: backendDomain,
port: 3210,
serviceName: "backend",
},
{
host: actionsDomain,
port: 3211,
serviceName: "backend",
},
];
const envs = [
`NEXT_PUBLIC_DEPLOYMENT_URL=http://${backendDomain}`,
`CONVEX_CLOUD_ORIGIN=http://${backendDomain}`,
`CONVEX_SITE_ORIGIN=http://${actionsDomain}`,
];
const envs = [
`NEXT_PUBLIC_DEPLOYMENT_URL=http://${backendDomain}`,
`CONVEX_CLOUD_ORIGIN=http://${backendDomain}`,
`CONVEX_SITE_ORIGIN=http://${actionsDomain}`,
];
return { envs, domains };
return { envs, domains };
}

View File

@@ -1619,4 +1619,3 @@ export const templates: TemplateData[] = [
load: () => import("./wikijs/index").then((m) => m.generate),
},
];