Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Fixes and Optimizations in password manager/script.js #711

Open
Amansingh0807 opened this issue Feb 10, 2025 · 1 comment
Open

Code Fixes and Optimizations in password manager/script.js #711

Amansingh0807 opened this issue Feb 10, 2025 · 1 comment

Comments

@Amansingh0807
Copy link

The current code has several issues related to variable declarations, incorrect function logic, and missing input handling. This issue aims to address and fix these problems for better performance and code reliability.

Issues Identified:

Incorrect Password Masking:

  • maskPassword() was using Array.length instead of pass.length.

Undeclared Variables:

  • Missing let/const for arrUpdated, causing scope issues.

Missing Input References:

  • Website, username, and password were used without document.getElementById() references.

Form Reset Issue:

  • Incorrect form field reset logic after adding passwords.

Lack of Input Validation:

  • No validation for empty fields before saving passwords.

Fixes Applied:

  • Corrected the password masking logic.
  • Declared all variables properly with let or const.
  • Added input field references using getElementById().
  • Improved form validation and reset logic.
  • Optimized overall code for readability and efficiency.
Copy link
Contributor

Thank you for raising this issue! We'll look into it as soon as possible. Please ensure that the issue is not duplicate, and you read CONTRIBUTING.md carefully. Your contributions are highly appreciated! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant