Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1062: Encryption tweaks #114

Merged
merged 4 commits into from
Jun 26, 2024
Merged

Conversation

jekuaitk
Copy link
Contributor

@jekuaitk jekuaitk commented Jun 25, 2024

https://leantime.itkdev.dk/tickets/showKanban?tab=ticketdetails#/tickets/showTicket/1062

  • Ensures data is encrypted when sent to database
  • Handles computed elements

modules/os2forms_encrypt/src/Helper/Os2FormsEncryptor.php Outdated Show resolved Hide resolved
* @see Drupal\webform_encrypt\WebformEncryptSubmissionStorage::loadData
* @see Drupal\webform\WebformSubmissionStorage::loadData
*/
protected function loadData(array &$webform_submissions) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, WebformEncryptSubmissionStorage::loadData calls WebformSubmissionStorage::loadData before decrypting resulting in computed elements being computed before having their values decrypted.

In our case this result in the classic TypeError: Unsupported operand types: string * int in __TwigTemplate__.

@cableman
Copy link
Contributor

Maybe even more documentation on the storage class, why all this is needed.

@jekuaitk
Copy link
Contributor Author

Maybe even more documentation on the storage class, why all this is needed.

Added extra section to class documentation.

@jekuaitk jekuaitk requested a review from cableman June 25, 2024 14:24
@jekuaitk jekuaitk merged commit fabd526 into OS2Forms:develop Jun 26, 2024
7 checks passed
@jekuaitk jekuaitk deleted the feature/encryption-tweaks branch June 26, 2024 07:55
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