Repository navigation
Conversation
…_digital_signature_security * commit '100e15f20d3d26f5d9950134282b74bea48aa960': (42 commits) 312: Set #parents before building handler configuration forms Computed twig encryption fix (#380) #321 deleting SaveToFile handler (#382) Fixing autocomplete fields usage (#381) Add missing trailing comma Applied map display settings consistently Remove delete state from handlers and require php 8.3 Preparing 6.1.0 Bumped os2web_datalookup version Apply coding standards Ensure no attachments with export type html are signed Run handler conditions before adding signature validation text Upgrading Gin theme OS-320 SBSYS child elements integration (#365) Fixing translation setting page (#359) Synching develop with master changes (#364) Preparing release 6.0.0 #355 OS-314 children select element '#address_protection_help_text' fix 352: Code cleanup 352: Updated CHANGELOG ... # Conflicts: # modules/os2forms_digital_signature/src/Plugin/WebformHandler/DigitalSignatureWebformHandler.php
|
@MadNicGit vil I lave review på dette PR. Det er ikke et issue på dette PR af sikkerhedsmæssige årsager. Spørg evt. Gitte efter en mail jeg lige har sendt til Koordinationsgruppen. |
| $expectedFileUri = $file->getFileUri(); | ||
| // If $existingAttachment FID is present - we are replacing uploaded/managed | ||
| // file, otherwise, creating a new one. | ||
| $existingAttachment = $this->signingDocumentResolver->resolve($webformSubmission); |
There was a problem hiding this comment.
Would it not be beneficial to resolve this as early as possible? Say, before downloading the signed file's content but after checking the hashes?
|
|
||
| /** @var \Drupal\webform\Plugin\WebformElementAttachmentInterface $elementPlugin */ | ||
| $elementPlugin = $this->elementManager->getElementInstance($element); | ||
| $attachments = $elementPlugin->getEmailAttachments($element, $webformSubmission); |
There was a problem hiding this comment.
Am i right in saying that the resolve method is used in preSave() to render and get the actual content of the attachment file?
But then it is also used during signCallback() just for the purpose of finding the fid? Is it not possible to use a more light-weight method of finding the fid?
| // SwiftMailer and Mime Mail consume filecontent rather than filepath. | ||
| if (($this->moduleHandler->moduleExists('swiftmailer') | ||
| || $this->moduleHandler->moduleExists('mimemail')) | ||
| && isset($attachment['filecontent'], $attachment['filepath'])) { | ||
| unset($attachment['filepath']); | ||
| } |
There was a problem hiding this comment.
We don't use either of these modules. Do you?
No description provided.