An encrypted Flexicontent field

5 years 4 months ago #41646 by wiebe
Hi there,

I like some input on if the approach I am planning to follow would lead to an acceptable result.

I want to create a Flexicontent field type to enable me to store (minor sensitive) data with at least some security.
I am well aware of all the security implications... this is going to run in a secure environment only (SSL) and I do not want to get into a discussion about security issues in general.

My approach would be to create a new Flexicontent_fields plugin (Encoded), which I will add to the jos_extensions table and the processLanguageFiles function.

I would then implement the encoding inside the onBeforeSaveField function of the plugin - using mcrypt_encrypt and base64_encode to allow storing of the value without having to modify the database structure.

The decrypting would be implemented inside the onDisplayFieldValue function.

All together this sounds pretty straightforward to me, but maybe there is something I have missed.

Would this work?

Hope to hear.



Please Log in or Create an account to join the conversation.

5 years 4 months ago #41652 by ggppdk

you don't need to modify any DB tables, just zip your files
and then install via Joomla extension manager and then publish them via Joomla plugin manager

- for the rest, yes the way to do it is using the event that you describe (onBeforeSaveField), just to make it easier to duplicate an existing field, may be choose a field with easy name for replacing?

e.g. if you choose 'weblink' field then the search and replace (case sensitive for: weblink, Weblink) will be easy,

if you choose field 'text' then search and replace will find words that should not be replaced

I guess you have seen this FAQ article:
How to Duplicate a Flexicontent Field to create a new Field Type

-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.