Backup restore fails: ciphertext has an invalid padding length #986
Steps to reproduce the issue
Installing a fresh copy of joomla
Restore backup file made in previous install either via directoy or upload of zip file
Complete restore on JCB components
Truncated restore, Displayed message is:
Error 0 The ciphertext has an invalid padding length (118) compared to the block size (16)
System information (as much as possible)
- OS Name & Version: Linux CentOS 4.18.0-372.19.1.lve.el7h.x86_64
- MySql Version: 10.3.38-MariaDB-log
- Apache Version: 2.4.55
- PHP Version: 8.2
- Joomla Version: 3.10.11.
- JCB Version: 3.1.19
- Browser: Opera 96.0.4693.80, Chromium:110.0.5481.192
I have also seen this issue, and I am not sure how we will resolve this, I have tried to fix this already once. The problem we have is that the way FOF encryption worked did not follow industry standards, and so now moving to a more serious and stable solution we are having trouble with the matching up of the differences.
These are the new classes I wrote to try and solve the issue, but as you see its back.
I am open for ideas... But in simple terms, the padding added to the string during encryption by the FOFEncryptAes was not done correctly, and can therefore just be opened with FOFEncryptAes again, and not with another tool (that follows industry standard approach) as you can see.
I am at this point thinking we need to build a migration script/component/tool or something, as this will effect all encrypted datasets. Will you believe that one of the main reasons the transition to Joomla 4 has been so slow is this issue. So I spend a great deal of time trying to remedy this, and though it seems to work at times, it also seems to fail at other times.
The current work around is to import the component in the same version of JCB in-which it the JCB package was exported, and then to upgrade that JCB to the current version and export it again... then the import will work.
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?