Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@AlternateIf
Copy link
Contributor

in case of having a reserved keyword as field on an objectbrick (e.g "use") the inheritance helper fails to update a child that does not have a brick that is set on the parent.

since this helper is called upon save of an object, this leads to the obect save throwing an exception in the backend. the dbal insert function states:
"Table expression and columns are not escaped and are not safe for user-input."%

the same might also apply for localized fields.

@github-actions
Copy link

github-actions bot commented Jun 13, 2024

Review Checklist

  • Target branch (11.2 for bug fixes, others 11.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

@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@ghost ghost added the Pimcore:ToDo label Jun 20, 2024
@mcop1 mcop1 added this to the 11.2.7 milestone Jun 28, 2024
@mcop1 mcop1 self-assigned this Jun 28, 2024
@mcop1 mcop1 added the Bug label Jun 28, 2024
@mcop1
Copy link
Contributor

mcop1 commented Jun 28, 2024

Hello @AlternateIf ,
thanks for the pr. What do you think about using quote method of db class? And maybe quoteDataIdentifiers method of Helper class (

public static function quoteDataIdentifiers(Connection $db, array $data): array
) instead of the tmp array?
Should have the same affect, right? And would help to reduce duplicated code.

@AlternateIf
Copy link
Contributor Author

@mcop1 changed it to use the helper function

@markus-moser
Copy link
Contributor

LGTM - thanks for fixing it!

@markus-moser markus-moser merged commit f8b92d4 into pimcore:11.2 Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants