Closed (duplicate)
Project:
Webform Encrypt
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Oct 2011 at 17:11 UTC
Updated:
16 Aug 2013 at 18:40 UTC
When downloading information, if the user has permissions to decrypt the data, the data should be decrypted in the results tab (e.g. when viewing the table or downloading)
Comments
Comment #1
mgladding commentedI am also interested in this feature.
Thanks for the help!
Comment #2
origami commentedThis is what I am using to fix the problem of encrypted values in downloads and table view--replace the function webform_encrypt_webform_submission_render_alter with a function using the submission load hook instead:
Comment #3
robbyclark commentedThanks, patched the module with this code and it has saved my bacon on a project today. Tested and it seems to work well. Will this be commited as an official patch to the module? it would make sense!
Comment #4
theunraveler commentedThanks for patching. I'm looking in to it currently.
Comment #5
bernman commentedTo make this work for multiple entries in a select, we need to iterate though the values array. My suggestion would be:
Comment #6
apb1991 commentedThis code works great! Thanks!
Comment #7
theunraveler commentedI'm moving this to a more comprehensive discussion in #1433524: Webform Encrypt displays encrypted data where it shouldn't.
Comment #8
swara05 commentedMany thanks...I am also looking for the same solution. After replacing function i can see the original value. But the problem raised after replacing the function and when see the results-submissions in my webform ---Notice: unserialize() [function.unserialize]: Error at offset 0 of 7 bytes in _encrypt_decrypt() (line...\encrypt\includes\encrypt.crypt.inc) -- i seen this notice as many times occurred on that page..so what is going wrong here i cant understand...
Thank you so much for that code.I really appreciate that.
Comment #9
ydahiSeeing the same notice as swara10:
Notice: unserialize(): Error at offset 0 of 4 bytes in _encrypt_decrypt() (line 175 of /var/vhosts/spg/sites/all/modules/encrypt/includes/encrypt.crypt.inc).Encryption/Decryption works perfectly thanks to the code provided above.
Would be grateful to see the notices addressed as well.
Comment #10
ydahiAfter some mucking around, I figured out the issue causing the "unserialized()" notice.
The submissions previous to the encryption of the field(s) were causing the notice, as the module did not have anything to decrypt for those submissions.
If you clear your submissions and start fresh, the notices should not appear.
Alternatively, you can set "Logging and Errors" to only show "Errors and warnings" in admin/config/development/logging, as the notices are not detrimental to your site. However, this means that the submissions prior to encryption are not, well, encrypted.