The webform I am working on contains a couple of nested fieldsets and I noticed that when I view a submission it displays the raw encrypted data. Looking into the code I can see that there is no checking done to see if the item is inside a fieldset. Also if a hidden field happens to be encrypted (say you are adding data to this field using a hook) then it is not automatically decrypted. This is due to it using #markup as the array key, not #value.

I have attached a patch to this issue which handles the nested fieldsets and the hidden field. The code checks to see if there are parents on the encrypted component and then provides a reference to that component within the fieldset.

Comments

akoepke’s picture

StatusFileSize
new1.7 KB

Just noticed that my change to allow #markup and #value had the unwanted side-effect of including the data in the site owner email, even if you deselected it.

I have now put a check in there which only uses the #markup if it is set and it is not an email.

cviccaro’s picture

Kudos for your patch.. it works well. Thanks.

pebosi’s picture

Status: Needs review » Reviewed & tested by the community

Works for me, too.

theunraveler’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

This should be fixed in 7.x-1.x. Needs to be backported to 6.x-1.x, which I will do this weekend. Thanks for the reports.

yan’s picture

Issue summary: View changes
StatusFileSize
new1.64 KB

Patch from #1 seems to solve the problem for me using 6.x-1.x-dev. I attach a patch for the latest D6 dev version of the module.

  • theunraveler committed a129f89 on 8.x-1.x
    - Fixes #1503786: Encrypted items inside a fieldset are not decrypted...