Captain FLAM Posted July 28, 2018 Posted July 28, 2018 I think my correction is correct, but I don't have time to do check and to do better ... (I use TB 1.0.5 & PHP 7.1.9) You have to select "Use Rijndael with the openssl extension" in the BO > Advanced Parameters > Performance > Encryption in file : classes\Rijndael.php , line 68 ``` public function encrypt($plaintext) { if (mbstrlen($this->key, '8bit') !== 32) { return false; } if (function_exists('openssl_encrypt')) { // Correction of a BUG !! $ivsize = openssl_cipher_iv_length('aes-256-cbc'); try { $iv = random_bytes($ivsize); } catch (Exception $e) { if (function_exists('openssl_random_pseudo_bytes(')) { $iv = openssl_random_pseudo_bytes($ivsize); } else { throw new Exception('No secure random number generator found on your system.'); } } //**************************************// $ciphertext = openssl_encrypt( $plaintext, 'aes-256-cbc', $this->_key, OPENSSL_RAW_DATA, $iv ); } else { ```
0 Captain FLAM Posted July 30, 2018 Author Posted July 30, 2018 else it doesn't work if you activate "Parameters > Performances > Encryption : Use Rijndael with the openssl extension" and of course in "Debug Mode" ;-)
0 datakick Posted July 30, 2018 Posted July 30, 2018 I believe it's this issue: https://github.com/thirtybees/thirtybees/issues/466
0 Captain FLAM Posted July 31, 2018 Author Posted July 31, 2018 (not sure : maybe with php 5.6 , I actually use php 7) This is why I posted this bug correction for reviewing ... Tell me all ! (indeed it works for me)
0 dosbiner Posted August 8, 2018 Posted August 8, 2018 May I know which file I must edit? I will try this to my site
0 Captain FLAM Posted August 10, 2018 Author Posted August 10, 2018 Sorry, I forgot it (not in my habits) ... I added it in the 1st post ;) And of course, you have to select "Use Rijndael with the openssl extension" in the BO > Advanced Parameters > Performance > Encryption I use PHP 5.6.25 & PHP 7.1.9
0 Captain FLAM Posted October 1, 2018 Author Posted October 1, 2018 Hurrah ! It's now corrected & committed in GitHub by @datakick <3
Question
Captain FLAM
I think my correction is correct, but I don't have time to do check and to do better ... (I use TB 1.0.5 & PHP 7.1.9)
You have to select "Use Rijndael with the openssl extension" in the BO > Advanced Parameters > Performance > Encryption
in file : classes\Rijndael.php , line 68 ``` public function encrypt($plaintext) { if (mbstrlen($this->key, '8bit') !== 32) { return false; }
```
8 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now