Skip to content

[Security]: Dependency Dao - Refactor SQL queries to use parameter binding#18991

Merged
kingjia90 merged 6 commits into12.3from
dependency-sql
Feb 19, 2026
Merged

[Security]: Dependency Dao - Refactor SQL queries to use parameter binding#18991
kingjia90 merged 6 commits into12.3from
dependency-sql

Conversation

@kingjia90
Copy link
Copy Markdown
Contributor

Changes in this pull request

Related https://github.com/pimcore/ee-pimcore/pull/743

Additional info

@kingjia90 kingjia90 added this to the 12.3.3 milestone Feb 19, 2026
@kingjia90 kingjia90 self-assigned this Feb 19, 2026
Copilot AI review requested due to automatic review settings February 19, 2026 14:07
@github-actions
Copy link
Copy Markdown

Review Checklist

  • Target branch (12.3 for bug fixes, others 12.x)
  • Tests (if it's testable code, there should be a test for it - get help)
  • Docs (every functionality needs to be documented, see here)
  • Migration incl. install.sql (e.g. if the database schema changes, ...)
  • Upgrade notes (deprecations, important information, migration hints, ...)
  • Label
  • Milestone

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request refactors SQL queries in the Dependency DAO to use parameter binding instead of string concatenation, addressing SQL injection security vulnerabilities. This is part of a broader security improvement initiative (related to https://github.com/pimcore/ee-pimcore/pull/743).

Changes:

  • Replaced string concatenation with named parameter placeholders (:sourceType, :sourceId, :targetType, :targetId, :value) in SQL queries
  • Added parameter and type arrays for proper parameter binding with Doctrine DBAL
  • Cleaned up unnecessary conditional return logic
  • Fixed minor formatting inconsistencies (spacing around operators, AS keyword capitalization)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 19, 2026 14:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 5 comments.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 19, 2026 14:29
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

@kingjia90 kingjia90 merged commit 1c3925f into 12.3 Feb 19, 2026
13 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 19, 2026
@kingjia90 kingjia90 deleted the dependency-sql branch February 19, 2026 14:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants