Skip to content

Conversation

@Saifulhuq01
Copy link

Description

Refactored EmailReadPlatformServiceImpl.java to replace legacy SQL string concatenation with JDBC Prepared Statements.

This change prevents potential SQL injection vulnerabilities by using ? placeholders and passing parameters dynamically via JdbcTemplate.

Resolves FINERACT-2461.
Also related to FINERACT-2459.

Changes

  • Refactored queries in retrieveAllPending, retrieveAllSent, and other read methods to use ? placeholders.
  • Implemented List<Object> to pass parameters dynamically.
  • Applied Spotless formatting.

Checklist

  • Commit message follows guidelines
  • Coding conventions followed
  • Build is passing

* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this removed?

@oleksii-novikov-onix
Copy link
Contributor

These changes really improved the code, but in my opinion it would be much more beneficial to rewrite it from jdbcTemplate to Spring Data JPA.

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

Successfully merging this pull request may close these issues.

3 participants