Baghina Radu Adrian
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Forum: Plugins
In reply to: [Gravitate Encryption] Test if plugin runs rightcheck this
Forum: Plugins
In reply to: [Gravitate Encryption] Not compatible with PHP 7.2I think is abandoned bu i had to fix the plugin my self so what I did is next open plugin file :
gds_encryption.php
then replace :public function encrypt($value)
public function encrypt($value) { $options = unserialize(get_option('gds_encryption')); /////////////////////////////////////////////////////////////////////////////////////////////////// // Symmetric Encryption /////////////////////////////////////////////////////////////////////////////////////////////////// if ($options['encription_type'] == 'symmetric') { $key = hash('SHA256', "djkns(235mk^p" . "7%r?1C" . trim($options['encryption_key']) . "jr-3", true); srand(); if (version_compare(phpversion(), '7.0.0', '<')) { $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC), MCRYPT_RAND); if (strlen($iv_base64 = rtrim(base64_encode($iv), '=')) != 22) return false; $encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $value . md5($value), MCRYPT_MODE_CBC, $iv)); $value = "enx2:" . $iv_base64 . $encrypted; } else { $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('AES-256-CBC')); if (strlen($iv_base64 = rtrim(base64_encode($iv), '=')) != 22) return false; $encrypted = base64_encode(openssl_encrypt($value . md5($value), 'AES-256-CBC', $key, OPENSSL_RAW_DATA | OPENSSL_NO_PADDING, $iv)); $value = "enx2:" . $iv_base64 . $encrypted; } } else if ($options['encription_type'] == 'asymmetric') { openssl_seal($value, $encrypted, $ekey, array(openssl_get_publickey(trim($options['public_key'])))); $ekey = base64_encode($ekey[0]); $value = "enx1:" . $ekey . ':' . base64_encode($encrypted); } else if ($options['encription_type'] == 'encryption_weak') { $key = "7%r?1C" . trim($options['encryption_key']) . "jr-3"; $value = base64_encode($value); $value = "enx3:" . base64_encode(substr($value, 0, 3) . substr($value, 0, -5) . substr(base64_encode($key), 0, 6) . substr($value, -5) . substr($value, -3)); } return $value; }
and also replace function :
public function decrypt($value)
public function decrypt($value) { $options = unserialize(get_option('gds_encryption')); if (strpos($value, "enx") !== false) { if (strpos($value, "enx2:") !== false) { $value = str_replace("enx2:", "", $value); $salt = "djkns(235mk^p"; $password = "7%r?1C" . trim($options['encryption_key']) . "jr-3"; $key = hash('SHA256', $salt . $password, true); $iv = base64_decode(substr($value, 0, 22) . '=='); if (version_compare(phpversion(), '7.0.0', '<')) { $encrypted = substr($value, 22); $decrypted = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, base64_decode($encrypted), MCRYPT_MODE_CBC, $iv), "\0\4"); } else { $encrypted = base64_decode(substr($value, 22)); $decrypted = rtrim(openssl_decrypt($encrypted, "AES-256-CBC", $key, OPENSSL_RAW_DATA | OPENSSL_NO_PADDING, $iv), "\0\4"); } $hash = substr($decrypted, -32); $decrypted = substr($decrypted, 0, -32); if (md5($decrypted) != $hash) $value = ''; $value = $decrypted; } else if (strpos($value, "enx1:") !== false) { if (empty($options['private_key'])) { $value = 'XXXXXXXXX'; } else { $value = str_replace("enx1:", "", $value); $split = explode(":", $value); // Split the String on : (Colon). First part is the Envelope Key. Second Part is the Encrypted Data. $envelope_key = base64_decode($split[0]); $encrypted_data = base64_decode($split[1]); openssl_open($encrypted_data, $decrypted_data, $envelope_key, openssl_get_privatekey(trim($options['private_key']))); $value = $decrypted_data; } } else if (strpos($value, "enx3:") !== false) { $key = "7%r?1C" . trim($options['encryption_key']) . "jr-3"; $value = base64_decode(str_replace("enx3:", "", $value)); $value = substr($value, 3, -3); $value = base64_decode(str_replace(substr(base64_encode($key), 0, 6), '', $value)); } } // $encrypt = encrypt($value) return $value; }
also there is a error on function public function gform_get_field_value($value, $lead, $field, $input_id)
you can repace :$long = $wpdb->get_row($wpdb->prepare("SELECT value FROM " . $wpdb->prefix . "rg_lead_detail_long WHERE<code>lead_detail_id</code>= %d", $detail->id)) ;
by this:
$long = isset($detail->id) ? $wpdb->get_row($wpdb->prepare("SELECT value FROM " . $wpdb->prefix . "rg_lead_detail_long WHERE<code>lead_detail_id</code>= %d", $detail->id)) : [];
now for php 7.2 is use openssl_decrypt, openssl_encrypt instead of mcrypt.
- This reply was modified 5 years, 8 months ago by Baghina Radu Adrian.
Forum: Plugins
In reply to: [Softmixt Relations] Links related to taxonomyTaxonomies also included now
Forum: Plugins
In reply to: [Softmixt Relations] Links related to taxonomyHi @jeferssons sorry for my late reply . For the current version is not supported Taxonomy relations you can only relate posts i’m planing to add this feature for the next version.
Just add.
define('ADMIN_COOKIE_PATH', '/'); define('COOKIE_DOMAIN', ''); define('COOKIEPATH', ''); define('SITECOOKIEPATH', '');
to wp-config.php file.
Viewing 5 replies - 1 through 5 (of 5 total)