fix: cleanup files
This commit is contained in:
@@ -80,10 +80,6 @@ function cleanupSession(sessionId: string) {
|
|||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
clearTimeout(session.timeout);
|
clearTimeout(session.timeout);
|
||||||
delete sshSessions[sessionId];
|
delete sshSessions[sessionId];
|
||||||
dockerLogger.info("Docker SSH session cleaned up", {
|
|
||||||
operation: "session_cleanup",
|
|
||||||
sessionId,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -472,7 +468,6 @@ app.post("/docker/ssh/connect", async (req, res) => {
|
|||||||
cleanupSession(sessionId);
|
cleanupSession(sessionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean up any stale pending TOTP sessions
|
|
||||||
if (pendingTOTPSessions[sessionId]) {
|
if (pendingTOTPSessions[sessionId]) {
|
||||||
try {
|
try {
|
||||||
pendingTOTPSessions[sessionId].client.end();
|
pendingTOTPSessions[sessionId].client.end();
|
||||||
|
|||||||
@@ -1017,7 +1017,6 @@ wss.on("connection", async (ws: WebSocket, req) => {
|
|||||||
finish(responses);
|
finish(responses);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Set timeout for TOTP response
|
|
||||||
totpTimeout = setTimeout(() => {
|
totpTimeout = setTimeout(() => {
|
||||||
if (keyboardInteractiveFinish) {
|
if (keyboardInteractiveFinish) {
|
||||||
keyboardInteractiveFinish = null;
|
keyboardInteractiveFinish = null;
|
||||||
@@ -1070,7 +1069,6 @@ wss.on("connection", async (ws: WebSocket, req) => {
|
|||||||
finish(responses);
|
finish(responses);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Set timeout for password response
|
|
||||||
totpTimeout = setTimeout(() => {
|
totpTimeout = setTimeout(() => {
|
||||||
if (keyboardInteractiveFinish) {
|
if (keyboardInteractiveFinish) {
|
||||||
keyboardInteractiveFinish = null;
|
keyboardInteractiveFinish = null;
|
||||||
|
|||||||
@@ -1044,7 +1044,7 @@
|
|||||||
"noneAuthDescription": "This authentication method will use keyboard-interactive authentication when connecting to the SSH server.",
|
"noneAuthDescription": "This authentication method will use keyboard-interactive authentication when connecting to the SSH server.",
|
||||||
"noneAuthDetails": "Keyboard-interactive authentication allows the server to prompt you for credentials during connection. This is useful for servers that require multi-factor authentication or if you do not want to save credentials locally.",
|
"noneAuthDetails": "Keyboard-interactive authentication allows the server to prompt you for credentials during connection. This is useful for servers that require multi-factor authentication or if you do not want to save credentials locally.",
|
||||||
"forceKeyboardInteractive": "Force Keyboard-Interactive",
|
"forceKeyboardInteractive": "Force Keyboard-Interactive",
|
||||||
"forceKeyboardInteractiveDesc": "Forces the use of keyboard-interactive authentication. This is often required for servers that use Two-Factor Authentication (TOTP/2FA).",
|
"forceKeyboardInteractiveDesc": "Forces the use of keyboard-interactive authentication. This is sometimes required for servers that use Two-Factor Authentication (TOTP/2FA).",
|
||||||
"overrideCredentialUsername": "Override Credential Username",
|
"overrideCredentialUsername": "Override Credential Username",
|
||||||
"overrideCredentialUsernameDesc": "Use a different username than the one stored in the credential. This allows you to use the same credential with different usernames.",
|
"overrideCredentialUsernameDesc": "Use a different username than the one stored in the credential. This allows you to use the same credential with different usernames.",
|
||||||
"jumpHosts": "Jump Hosts",
|
"jumpHosts": "Jump Hosts",
|
||||||
@@ -1923,7 +1923,13 @@
|
|||||||
"snippetsSettings": "Snippets",
|
"snippetsSettings": "Snippets",
|
||||||
"currentPassword": "Current Password",
|
"currentPassword": "Current Password",
|
||||||
"passwordChangedSuccess": "Password changed successfully! Please log in again.",
|
"passwordChangedSuccess": "Password changed successfully! Please log in again.",
|
||||||
"failedToChangePassword": "Failed to change password. Please check your current password and try again."
|
"failedToChangePassword": "Failed to change password. Please check your current password and try again.",
|
||||||
|
"theme": "Theme",
|
||||||
|
"themeLight": "Light",
|
||||||
|
"themeDark": "Dark",
|
||||||
|
"themeSystem": "System",
|
||||||
|
"appearanceDesc": "Select the color theme for the application",
|
||||||
|
"terminalSyntaxHighlightingDesc": "Automatically highlight commands, paths, IPs, and log levels in terminal output"
|
||||||
},
|
},
|
||||||
"user": {
|
"user": {
|
||||||
"failedToLoadVersionInfo": "Failed to load version information"
|
"failedToLoadVersionInfo": "Failed to load version information"
|
||||||
|
|||||||
@@ -430,10 +430,7 @@ export function UserProfile({
|
|||||||
{t("leftSidebar.deleteAccount")}
|
{t("leftSidebar.deleteAccount")}
|
||||||
</Label>
|
</Label>
|
||||||
<p className="text-sm text-muted-foreground mt-1">
|
<p className="text-sm text-muted-foreground mt-1">
|
||||||
{t(
|
{t("leftSidebar.deleteAccountWarningShort")}
|
||||||
"leftSidebar.deleteAccountWarningShort",
|
|
||||||
"This action is not reversible and will permanently delete your account.",
|
|
||||||
)}
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
@@ -448,7 +445,6 @@ export function UserProfile({
|
|||||||
</TabsContent>
|
</TabsContent>
|
||||||
|
|
||||||
<TabsContent value="appearance" className="space-y-4">
|
<TabsContent value="appearance" className="space-y-4">
|
||||||
{/* Language & Localization Section */}
|
|
||||||
<div className="rounded-lg border-2 border-edge bg-elevated p-4">
|
<div className="rounded-lg border-2 border-edge bg-elevated p-4">
|
||||||
<h3 className="text-lg font-semibold mb-4">
|
<h3 className="text-lg font-semibold mb-4">
|
||||||
{t("profile.languageLocalization")}
|
{t("profile.languageLocalization")}
|
||||||
@@ -468,22 +464,18 @@ export function UserProfile({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Theme Section */}
|
|
||||||
<div className="rounded-lg border-2 border-edge bg-elevated p-4">
|
<div className="rounded-lg border-2 border-edge bg-elevated p-4">
|
||||||
<h3 className="text-lg font-semibold mb-4">
|
<h3 className="text-lg font-semibold mb-4">
|
||||||
{t("profile.appearance", "Appearance")}
|
{t("profile.appearance")}
|
||||||
</h3>
|
</h3>
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
<Label className="text-foreground-secondary">
|
<Label className="text-foreground-secondary">
|
||||||
{t("profile.theme", "Theme")}
|
{t("profile.theme")}
|
||||||
</Label>
|
</Label>
|
||||||
<p className="text-sm text-muted-foreground mt-1">
|
<p className="text-sm text-muted-foreground mt-1">
|
||||||
{t(
|
{t("profile.appearanceDesc")}
|
||||||
"profile.appearanceDesc",
|
|
||||||
"Choose your preferred theme",
|
|
||||||
)}
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Select value={theme} onValueChange={setTheme}>
|
<Select value={theme} onValueChange={setTheme}>
|
||||||
@@ -494,19 +486,19 @@ export function UserProfile({
|
|||||||
<SelectItem value="light">
|
<SelectItem value="light">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Sun className="w-4 h-4" />
|
<Sun className="w-4 h-4" />
|
||||||
{t("profile.themeLight", "Light")}
|
{t("profile.themeLight")}
|
||||||
</div>
|
</div>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
<SelectItem value="dark">
|
<SelectItem value="dark">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Moon className="w-4 h-4" />
|
<Moon className="w-4 h-4" />
|
||||||
{t("profile.themeDark", "Dark")}
|
{t("profile.themeDark")}
|
||||||
</div>
|
</div>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
<SelectItem value="system">
|
<SelectItem value="system">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Monitor className="w-4 h-4" />
|
<Monitor className="w-4 h-4" />
|
||||||
{t("profile.themeSystem", "System")}
|
{t("profile.themeSystem")}
|
||||||
</div>
|
</div>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
@@ -515,7 +507,6 @@ export function UserProfile({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* File Manager Section */}
|
|
||||||
<div className="rounded-lg border-2 border-edge bg-elevated p-4">
|
<div className="rounded-lg border-2 border-edge bg-elevated p-4">
|
||||||
<h3 className="text-lg font-semibold mb-4">
|
<h3 className="text-lg font-semibold mb-4">
|
||||||
{t("profile.fileManagerSettings")}
|
{t("profile.fileManagerSettings")}
|
||||||
@@ -538,7 +529,6 @@ export function UserProfile({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Terminal Section */}
|
|
||||||
<div className="rounded-lg border-2 border-edge bg-elevated p-4">
|
<div className="rounded-lg border-2 border-edge bg-elevated p-4">
|
||||||
<h3 className="text-lg font-semibold mb-4">
|
<h3 className="text-lg font-semibold mb-4">
|
||||||
{t("profile.terminalSettings")}
|
{t("profile.terminalSettings")}
|
||||||
@@ -567,8 +557,7 @@ export function UserProfile({
|
|||||||
</span>
|
</span>
|
||||||
</Label>
|
</Label>
|
||||||
<p className="text-sm text-muted-foreground mt-1">
|
<p className="text-sm text-muted-foreground mt-1">
|
||||||
Automatically highlight commands, paths, IPs, and log
|
{t("profile.terminalSyntaxHighlightingDesc")}
|
||||||
levels in terminal output
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Switch
|
<Switch
|
||||||
@@ -579,7 +568,6 @@ export function UserProfile({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Host & Sidebar Section */}
|
|
||||||
<div className="rounded-lg border-2 border-edge bg-elevated p-4">
|
<div className="rounded-lg border-2 border-edge bg-elevated p-4">
|
||||||
<h3 className="text-lg font-semibold mb-4">
|
<h3 className="text-lg font-semibold mb-4">
|
||||||
{t("profile.hostSidebarSettings")}
|
{t("profile.hostSidebarSettings")}
|
||||||
@@ -602,7 +590,6 @@ export function UserProfile({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Snippets Section */}
|
|
||||||
<div className="rounded-lg border-2 border-edge bg-elevated p-4">
|
<div className="rounded-lg border-2 border-edge bg-elevated p-4">
|
||||||
<h3 className="text-lg font-semibold mb-4">
|
<h3 className="text-lg font-semibold mb-4">
|
||||||
{t("profile.snippetsSettings")}
|
{t("profile.snippetsSettings")}
|
||||||
|
|||||||
Reference in New Issue
Block a user