Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request from patched fixes 18 issues.
Fix SQL injection vulnerability by using PreparedStatement
Replaced the Statement with a PreparedStatement to prevent SQL injection vulnerability by using parameterized queries.Fix SQL injection vulnerability by using PreparedStatement
Replaced Statement with PreparedStatement to prevent SQL injection vulnerabilityFix SQL injection vulnerability by using PreparedStatement
Replaced Statement with PreparedStatement to prevent SQL injection by using input parameters properly.Fix SQL injection vulnerability by using PreparedStatement
Replaced the Statement with PreparedStatement to prevent SQL injection by using parameter placeholders.Fix SQL injection vulnerability by using PreparedStatement
Replaced Statement with PreparedStatement to prevent SQL injection vulnerabilityFix SQL injection vulnerability by using PreparedStatement
Replaced Statement with PreparedStatement to address SQL injection vulnerability.Remove debug code from getBankUsernames method
Removed the line that prints the stack trace when catching an SQLException in the getBankUsernames method.Fix SQL injection vulnerability by switching to prepared statement
Replaced the SQL query construction with a prepared statement to prevent SQL injection vulnerability.Fix SQL injection vulnerability by using prepared statements
Replaced Statement with PreparedStatement to prevent SQL injection vulnerability by using prepared statements instead of formatted strings.Fix SQL injection vulnerability by using PreparedStatement
Replaced Statement with PreparedStatement to prevent SQL injection by using parameterized queryFix SQL injection vulnerability by using PreparedStatement
Replaced Statement with PreparedStatement to prevent SQL injection vulnerability by using PreparedStatement to execute the SQL query securely.Fix SQL injection vulnerability by using PreparedStatement
Replaced Statement with PreparedStatement to fix SQL injection vulnerability by using parameterized query.Remove debug print statement
Removed the debug print statement (e.printStackTrace()) and replaced it with logging the error message using Log4j.Remove debug code from isLoggedin method
Removed the debug line "e.printStackTrace();" from the catch block in the isLoggedin method.Fix session middleware settings and remove debug code
- AddedaccountCookie.setSecure(true);
to ensure the cookie is sent only over HTTPS.e.printStackTrace();
to get rid of the debug code.Fix vulnerability with insecure random number generation
Replaced the usage ofjava.util.Random
withjava.security.SecureRandom
to ensure secure random number generation.Fix insecure link to HTTPS
Changed the insecure HTTP link to an HTTPS link for better security.Fix session cookie vulnerabilities
Added setting 'HttpOnly' and 'secure' flags to session cookie to improve security.