Skip to content

fix/ escape SQL values#627

Open
Herafia wants to merge 3 commits into
mainfrom
fix-datainjection-escape-sql-value
Open

fix/ escape SQL values#627
Herafia wants to merge 3 commits into
mainfrom
fix-datainjection-escape-sql-value

Conversation

@Herafia
Copy link
Copy Markdown
Contributor

@Herafia Herafia commented May 20, 2026

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes !44078
  • SQL queries in dataAlreadyInDB concatenated field values directly without escaping, causing a syntax error when names contain apostrophes . All affected concatenations now use escape().

@Herafia Herafia requested review from Rom1-B, Copilot and stonebuzz and removed request for Copilot May 20, 2026 07:32
@Herafia Herafia self-assigned this May 20, 2026
Comment thread inc/commoninjectionlib.class.php Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It would be cleaner to refactor the code to replace doQuery() with the query builder.

$result = $DB->request($criteria);

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.

2 participants