v1.7.1 #335

Merged
LukeGus merged 1 commits from dev-1.7.1 into main 2025-10-03 05:02:11 +00:00
LukeGus commented 2025-10-03 04:53:22 +00:00 (Migrated from github.com)

Fixes bugs with password reset, terminal encoding, login failures after encryption migration, and import/export issues.

Update Log:

  • Fixed encoding and SSH fallback for legacy servers (#282)
  • Fixed emoji rendering in terminal (#266)
  • Include credentials/sensitive data in host export/import (#254)
  • Fixed password reset, blocking users from logging in at all (#329)
  • Fixed Linux desktop not starting (#239)
  • Mostly fixed issues with users not being able to log in after encryption (#320)
  • Fixed max storage being set to available storage in server stats (#313)
Fixes bugs with password reset, terminal encoding, login failures after encryption migration, and import/export issues. Update Log: - Fixed encoding and SSH fallback for legacy servers (#282) - Fixed emoji rendering in terminal (#266) - Include credentials/sensitive data in host export/import (#254) - Fixed password reset, blocking users from logging in at all (#329) - Fixed Linux desktop not starting (#239) - Mostly fixed issues with users not being able to log in after encryption (#320) - Fixed max storage being set to available storage in server stats (#313)
gemini-code-assist[bot] commented 2025-10-03 04:55:59 +00:00 (Migrated from github.com)

Summary of Changes

Hello @LukeGus, I'm Gemini Code Assist1 ! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces Termix version v1.7.1, delivering a substantial upgrade focused on stability, security, and user experience. It resolves several key issues impacting user authentication and data handling, while also rolling out major new features. Users will benefit from automatic SSL setup, a more powerful SSH file manager with expanded operations, and enhanced SSH key management including generation and secure deployment. The underlying architecture has been significantly refactored to incorporate advanced cryptographic practices and streamline database interactions, ensuring a more secure and reliable platform. Additionally, the Electron desktop application now features built-in update checking and improved platform integration.

Highlights

  • Bug Fixes & Stability: Addressed critical bugs related to password reset, terminal encoding, login failures after encryption migration, and various import/export issues, enhancing overall system stability.
  • Enhanced File Management: Significantly expanded SSH file manager capabilities, introducing features like moving, copying, downloading, and executing files, along with improved symlink identification and file content preview/editing.
  • Advanced SSH Key Management: Implemented new functionalities for generating SSH key pairs (Ed25519, ECDSA, RSA), detecting key types, validating key pairs, and securely deploying public keys to remote hosts.
  • Automatic SSL Setup: Introduced automatic generation and management of self-signed SSL certificates for HTTPS, improving out-of-the-box security for server deployments.
  • Comprehensive Data Encryption & Migration: Refactored backend with new cryptographic utilities for field-level and file-level database encryption, lazy encryption migration for existing data, and secure user data export/import functionalities.
  • Electron App Updates: The Electron desktop application now includes an update checker, improved connection testing, and better Linux desktop integration with enhanced .desktop entry metadata.
  • Backend Infrastructure Improvements: Updated Dockerfiles to Node.js 22-slim, optimized build processes, and refactored backend services to use new centralized authentication, crypto, and database operation classes for a more robust and secure architecture.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/docker-image.yml
    • .github/workflows/electron-build.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩︎

## Summary of Changes Hello @LukeGus, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces Termix version `v1.7.1`, delivering a substantial upgrade focused on stability, security, and user experience. It resolves several key issues impacting user authentication and data handling, while also rolling out major new features. Users will benefit from automatic SSL setup, a more powerful SSH file manager with expanded operations, and enhanced SSH key management including generation and secure deployment. The underlying architecture has been significantly refactored to incorporate advanced cryptographic practices and streamline database interactions, ensuring a more secure and reliable platform. Additionally, the Electron desktop application now features built-in update checking and improved platform integration. ### Highlights * **Bug Fixes & Stability**: Addressed critical bugs related to password reset, terminal encoding, login failures after encryption migration, and various import/export issues, enhancing overall system stability. * **Enhanced File Management**: Significantly expanded SSH file manager capabilities, introducing features like moving, copying, downloading, and executing files, along with improved symlink identification and file content preview/editing. * **Advanced SSH Key Management**: Implemented new functionalities for generating SSH key pairs (Ed25519, ECDSA, RSA), detecting key types, validating key pairs, and securely deploying public keys to remote hosts. * **Automatic SSL Setup**: Introduced automatic generation and management of self-signed SSL certificates for HTTPS, improving out-of-the-box security for server deployments. * **Comprehensive Data Encryption & Migration**: Refactored backend with new cryptographic utilities for field-level and file-level database encryption, lazy encryption migration for existing data, and secure user data export/import functionalities. * **Electron App Updates**: The Electron desktop application now includes an update checker, improved connection testing, and better Linux desktop integration with enhanced `.desktop` entry metadata. * **Backend Infrastructure Improvements**: Updated Dockerfiles to Node.js 22-slim, optimized build processes, and refactored backend services to use new centralized authentication, crypto, and database operation classes for a more robust and secure architecture. <details> <summary><b>Ignored Files</b></summary> * **Ignored by pattern:** `.github/workflows/**` (2) * .github/workflows/docker-image.yml * .github/workflows/electron-build.yml </details> <details> <summary><b>Using Gemini Code Assist</b></summary> <br> The full guide for Gemini Code Assist can be found on our [documentation page](https://developers.google.com/gemini-code-assist/docs/review-github-code), here are some quick tips. <b>Invoking Gemini</b> You can request assistance from Gemini at any point by creating a comment using either `/gemini <command>` or `@gemini-code-assist <command>`. Below is a summary of the supported commands on the current page. Feature | Command | Description --- | --- | --- Code Review | `/gemini review` | Performs a code review for the current pull request in its current state. Pull Request Summary | `/gemini summary` | Provides a summary of the current pull request in its current state. Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. Help | `/gemini help` | Displays a list of available commands. <b>Customization</b> To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a `.gemini/` folder in the base of the repository. Detailed instructions can be found [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github). <b>Limitations & Feedback</b> Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up [here](https://google.qualtrics.com/jfe/form/SV_2cyuGuTWsEw84yG). <b>You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the [Gemini Code Assist IDE Extension](https://cloud.google.com/products/gemini/code-assist).</b> </details> [^1]: Review the [Privacy Notices](https://policies.google.com/privacy), [Generative AI Prohibited Use Policy](https://policies.google.com/terms/generative-ai/use-policy), [Terms of Service](https://policies.google.com/terms), and learn how to configure Gemini Code Assist in GitHub [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github). Gemini can make mistakes, so double check it and [use code with caution](https://support.google.com/legal/answer/13505487).
gemini-code-assist[bot] (Migrated from github.com) reviewed 2025-10-03 04:58:06 +00:00
gemini-code-assist[bot] (Migrated from github.com) left a comment

Code Review

This pull request introduces a significant number of features and bug fixes, most notably a comprehensive database encryption system, automatic SSL setup, and data import/export capabilities. The changes are extensive, touching everything from the Docker configuration to the backend API and frontend components. My review focuses on the new, complex areas, highlighting potential issues in security, performance, and maintainability. Key feedback includes suggestions to improve the Docker build process, adjust an overly long Nginx timeout, clarify a critical error message, and ensure that the data loss implications of a password reset are clearly communicated to the user.

## Code Review This pull request introduces a significant number of features and bug fixes, most notably a comprehensive database encryption system, automatic SSL setup, and data import/export capabilities. The changes are extensive, touching everything from the Docker configuration to the backend API and frontend components. My review focuses on the new, complex areas, highlighting potential issues in security, performance, and maintainability. Key feedback includes suggestions to improve the Docker build process, adjust an overly long Nginx timeout, clarify a critical error message, and ensure that the data loss implications of a password reset are clearly communicated to the user.
gemini-code-assist[bot] (Migrated from github.com) commented 2025-10-03 04:58:06 +00:00

medium

This command removes package-lock.json and uses npm install --force, which is not a best practice for creating reproducible Docker builds. The package-lock.json file ensures that the exact same dependency versions are installed every time. Removing it and forcing the installation can lead to unexpected dependency changes and make builds less reliable.

It would be better to revert to using npm ci, which is designed for this purpose and respects the lock file.

RUN npm ci --force --ignore-scripts && \
    npm cache clean --force
![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg) This command removes `package-lock.json` and uses `npm install --force`, which is not a best practice for creating reproducible Docker builds. The `package-lock.json` file ensures that the exact same dependency versions are installed every time. Removing it and forcing the installation can lead to unexpected dependency changes and make builds less reliable. It would be better to revert to using `npm ci`, which is designed for this purpose and respects the lock file. ``` RUN npm ci --force --ignore-scripts && \ npm cache clean --force ```
gemini-code-assist[bot] (Migrated from github.com) commented 2025-10-03 04:58:06 +00:00

medium

This production-deps stage installs build tools (python3, make, g++), which is redundant as they are already installed in the deps stage. More importantly, a production dependencies stage should ideally not contain build tools at all. The final image size is increased, and the attack surface is larger than necessary.

Consider refactoring to have a dedicated builder stage for compiling native modules, and then copy the final node_modules from there into the production-deps stage, which would only install runtime dependencies.

![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg) This `production-deps` stage installs build tools (`python3`, `make`, `g++`), which is redundant as they are already installed in the `deps` stage. More importantly, a production dependencies stage should ideally not contain build tools at all. The final image size is increased, and the attack surface is larger than necessary. Consider refactoring to have a dedicated `builder` stage for compiling native modules, and then copy the final `node_modules` from there into the `production-deps` stage, which would only install runtime dependencies.
gemini-code-assist[bot] (Migrated from github.com) commented 2025-10-03 04:58:06 +00:00

high

Setting the proxy_read_timeout and proxy_send_timeout for websockets to 86400s (24 hours) is excessively long. This could lead to resource exhaustion on the server if many connections remain open or hang without proper termination. It's generally safer to use a shorter timeout and rely on keepalive mechanisms to maintain active connections.

A timeout of 1-2 hours is usually more than sufficient for most use cases.

            proxy_read_timeout 3600s;
            proxy_send_timeout 3600s;
![high](https://www.gstatic.com/codereviewagent/high-priority.svg) Setting the `proxy_read_timeout` and `proxy_send_timeout` for websockets to `86400s` (24 hours) is excessively long. This could lead to resource exhaustion on the server if many connections remain open or hang without proper termination. It's generally safer to use a shorter timeout and rely on keepalive mechanisms to maintain active connections. A timeout of 1-2 hours is usually more than sufficient for most use cases. ``` proxy_read_timeout 3600s; proxy_send_timeout 3600s; ```
gemini-code-assist[bot] (Migrated from github.com) commented 2025-10-03 04:58:06 +00:00

medium

The error message here is a bit confusing. If database decryption fails, it means the data is already inaccessible. Stating that this action "prevents data loss" might mislead the user into thinking the data is safe, when in fact it's currently unreadable.

A clearer message would be more helpful for debugging, for example, by stating that the application is halting to prevent potential data corruption.

      throw new Error(
        `Database decryption failed: ${error instanceof Error ? error.message : "Unknown error"}. Halting to prevent data corruption. Please check your DATABASE_KEY.`,
      );
![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg) The error message here is a bit confusing. If database decryption fails, it means the data is already inaccessible. Stating that this action "prevents data loss" might mislead the user into thinking the data is safe, when in fact it's currently unreadable. A clearer message would be more helpful for debugging, for example, by stating that the application is halting to prevent potential data corruption. ```suggestion throw new Error( `Database decryption failed: ${error instanceof Error ? error.message : "Unknown error"}. Halting to prevent data corruption. Please check your DATABASE_KEY.`, ); ```
@@ -1320,0 +1337,4 @@
userId,
username,
},
);
gemini-code-assist[bot] (Migrated from github.com) commented 2025-10-03 04:58:05 +00:00

critical

This log message correctly identifies a critical side effect of password reset: all existing encrypted data becomes inaccessible. This is a destructive action that must be communicated to the user in the UI before they confirm the reset.

While this backend logic is correct in re-initializing the user's encryption keys, the frontend should display a very strong warning modal explaining that all saved passwords, SSH keys, and other encrypted data will be lost. This is a critical user experience and data integrity issue.

![critical](https://www.gstatic.com/codereviewagent/critical.svg) This log message correctly identifies a critical side effect of password reset: all existing encrypted data becomes inaccessible. This is a destructive action that must be communicated to the user in the UI *before* they confirm the reset. While this backend logic is correct in re-initializing the user's encryption keys, the frontend should display a very strong warning modal explaining that all saved passwords, SSH keys, and other encrypted data will be lost. This is a critical user experience and data integrity issue.
gemini-code-assist[bot] (Migrated from github.com) commented 2025-10-03 04:58:06 +00:00

medium

This check appears to be a fix for a potential race condition, preventing resource cleanup while a connection attempt is still in progress. This is a good defensive measure. To improve maintainability, please add a brief comment explaining why this check is necessary. This will prevent future developers from accidentally removing it and re-introducing the race condition.

  // Avoid cleaning up resources if a connection attempt for the same tunnel is in progress, unless forced.
  if (!forceCleanup && tunnelConnecting.has(tunnelName)) {
    return;
  }
![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg) This check appears to be a fix for a potential race condition, preventing resource cleanup while a connection attempt is still in progress. This is a good defensive measure. To improve maintainability, please add a brief comment explaining why this check is necessary. This will prevent future developers from accidentally removing it and re-introducing the race condition. ```suggestion // Avoid cleaning up resources if a connection attempt for the same tunnel is in progress, unless forced. if (!forceCleanup && tunnelConnecting.has(tunnelName)) { return; } ```
Sign in to join this conversation.