Problem/Motivation
We have custom entity types created with the external_entities module. These entities are not stored in the SQL database.
When I run security_review, it crashes with this error:
In ExceptionHandler.php line 53:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'national.offre__field_body' doesn't exist: SELECT "t".*
FROM
"offre__field_body" "t"; Array
(
)
In StatementWrapper.php line 145:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'national.offre__field_body' doesn't exist
There might be some other use cases where entities are not stored in the database.
Steps to reproduce
- Install security_review and external_entities.
- Configure an external entity type and add at least one field.
- Run security_review.
Proposed resolution
It should only run this check on fields stored in the SQL database.
Comments
Comment #3
prudloff commentedComment #4
himanshu_jhaloya commentedReviewed the merge request code base looks fine
Comment #5
himanshu_jhaloya commentedComment #6
smustgrave commentedComment #7
smustgrave commented@himanshu_jhaloya thank you but when reviewing please provide meaningful testing steps followed. See https://www.drupal.org/community/contributor-guide/task/review-a-patch-o... for guidance.
I changed this for the 2.0.x branch as that will be the more active branch going forward.
Tested to make sure this didn't break anything existing by adding "dangerous" code to the body field on a content type.
Ran the security review and it flagged everything correctly.
I don't have an external source to setup external_entities but as long as nothing existing broke I'm good.
Comment #9
smustgrave commented