PyChatGPT icon indicating copy to clipboard operation
PyChatGPT copied to clipboard

[BUG] [improvement] Security Concern: Exposing Email Credentials

Open Madhav-MKNC opened this issue 1 year ago • 1 comments

Describe the bug I would like to bring attention to a significant security concern within the current implementation of this project. The issue revolves around the requirement of providing email credentials as a parameter during the login process.

Background: The PyChatGPT project offers a convenient method for utilizing the ChatGPT model without relying on an API. However, the current approach introduces a severe security vulnerability by asking users to supply their email and password as input parameters for the login function. This practice is inherently unsafe and can potentially expose sensitive user data.

To Reproduce I propose the following alternatives:

  1. OAuth Integration: Utilize established authentication mechanisms such as OAuth, which allows users to authenticate through trusted third-party providers (e.g., Google, Facebook, GitHub) without exposing their credentials directly.

  2. Token-based Authentication: Implement a token-based authentication system where users are issued a unique access token upon successful login. This token can then be used for subsequent API calls, reducing the risk of exposing sensitive information.

  3. API Key Approach: Consider employing an API key-based authentication method, wherein users are assigned a unique key that is securely stored and exchanged during the authentication process.

Conclusion I urge the project maintainers to prioritize user security and promptly address this issue by implementing a more secure authentication method. Protecting user data is of paramount importance, and eliminating the requirement to expose email credentials will significantly reduce the risk of unauthorized access and potential privacy breaches.

Madhav-MKNC avatar Jun 19 '23 10:06 Madhav-MKNC

Is this using https for communications? Also for extra safety running it in a iptables jail means these coms can't be leaked anywhere

BC79 avatar Jan 19 '24 12:01 BC79