{$jConfig_secret} placeholder

davboh

New Member
Hi there, it seems {$jConfig_secret} placeholder is not replaced within calc and databasejoin (concat label) element.
I use one one the lastest release code (github)
Can anyone have a look please ?

Thanks
 
Because of security reasons Fabrik doesn't replace all params per default (maybe WIKI needs an update)

"...which we only want to use for stricty internal use that won't ever get shown to the user..."
 
Define "get"?

If you are trying to read it directly from the database yourself ...

Code:
$config   = JFactory::getConfig();
$secret = $config->get('secret');
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('AES_DECRYPT(encrypted_field, ' . $db->quote($secret) . ')')
   ->from('mytable')
   ->where('something = "whatever"');
$db->setQuery($query);
$encryptedField = $db->loadResult();

Obiously replace most of that query with your own. It's just the AES_DECRYPT() part which is relevant.

But yes, there are certain placeholders we only use when running "trusted" code (our own), and not when running user supplied code.

-- hugh
 
Tee code you provide is good for the calc element but not usable into the databasejoin concat label option. Do you have a solution for that?

By "get" I meant get the records from the db
 
Have a look at the Advanced/"Eval options".

Or maybe using a dropdown element with Advanced/"Eval populate" would be an option.
 
Unless I can use AES_DECRYPT in php, I cannot see how to use "Advanced/"Eval options" because the function comes from MYSQL and not php
 
I'll look at enabling the "unsafe" placeholders in the CONCAT label option.

WHen I initially added that feature, I erred on the side of safety to make sure the secret never got accidentally exposed, and only enabled 'unsafe' in a few places. I'm gradually adding it to more places, as we find the need.

Watch this >>> <<< space.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top