Skip to content

FINERACT-2459: Refactor SmsReadPlatformServiceImpl to use Prepared Statements - #5407

Merged
adamsaghy merged 1 commit into
apache:developfrom
Saifulhuq01:fix-sql-injection-cleanup
Feb 2, 2026
Merged

FINERACT-2459: Refactor SmsReadPlatformServiceImpl to use Prepared Statements#5407
adamsaghy merged 1 commit into
apache:developfrom
Saifulhuq01:fix-sql-injection-cleanup

Conversation

@Saifulhuq01

@Saifulhuq01 Saifulhuq01 commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

Description

Replaced potential SQL injection vulnerability in SmsReadPlatformServiceImpl.java by switching from String concatenation to Prepared Statements.

Resolves FINERACT-2459

Changes

  • Refactored retrieveAllPending to use ? placeholders for status_enum and campaign_id.
  • Implemented List<Object> to pass parameters dynamically to jdbcTemplate.
  • Applied Spotless formatting.

Checklist

  • Commit message follows guidelines
  • Coding conventions followed

@IOhacker

Copy link
Copy Markdown
Contributor

@Saifulhuq01 the PR and the commit doesn't follow the title conventions use "FINERACT-854: Use prepared statements instead of string concatenated SQL everywhere" squash and commit your changes because only 1 commit per PR is required. Maybe you should open a new Jira ticket on Apache Fineract jira for only one use case, because the title is "everywhere" and make sure the changes include a test.

@Saifulhuq01
Saifulhuq01 force-pushed the fix-sql-injection-cleanup branch from 6dd293b to 13679eb Compare January 30, 2026 04:20
@Saifulhuq01 Saifulhuq01 changed the title FINERACT-854: Fix(core): Replace SQL string concatenation with prepared statement i… FINERACT-2459: Refactor SmsReadPlatformServiceImpl to use Prepared Statements Jan 30, 2026
@Saifulhuq01

Copy link
Copy Markdown
Contributor Author

@IOhacker

Jira Ticket: Created specific ticket FINERACT-2459.

Squash: Squashed commits into a single commit with the new ID.

Tests: Verified that existing integration tests cover this service.

Ready for review.

@Saifulhuq01

Copy link
Copy Markdown
Contributor Author

@Saifulhuq01 the PR and the commit doesn't follow the title conventions use "FINERACT-854: Use prepared statements instead of string concatenated SQL everywhere" squash and commit your changes because only 1 commit per PR is required. Maybe you should open a new Jira ticket on Apache Fineract jira for only one use case, because the title is "everywhere" and make sure the changes include a test.

Hi @IOhacker, just a friendly bump on this. I have addressed the previous feedback (Squashed commits + JIRA ticket). Let me know if further changes are needed.

@IOhacker

IOhacker commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

LGTM

@Saifulhuq01

Copy link
Copy Markdown
Contributor Author

LGTM

Thanks for the review @IOhacker! Glad we could get this resolved. Looking forward to the merge.

@adamsaghy
adamsaghy merged commit b107acb into apache:develop Feb 2, 2026
37 checks passed
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