Skip to content

Commit

Permalink
Fix signature field image matching on existing field, in some instances
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Jan 10, 2025
1 parent ed86a83 commit 81d90a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/controllers/FieldsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ public function actionGetSignatureImage(): ?Response

// Use UID to prevent easy-guessing of submission to scrape data
if ($submissionUid && $fieldId) {
$submission = Submission::find()->uid($submissionUid)->one();
// Don't use a Submission element query, just in case there's a mixup with element/submission UIDs
// See https://github.com/verbb/formie/issues/2221
$submission = Craft::$app->getElements()->getElementByUid($submissionUid);

if ($submission && $form = $submission->getForm()) {
$signatureValue = null;
Expand Down

0 comments on commit 81d90a4

Please sign in to comment.