Backup restore fails: ciphertext has an invalid padding length #986
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#986
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
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?
Steps to reproduce the issue
Installing a fresh copy of joomla
Installing JCB
Restore backup file made in previous install either via directoy or upload of zip file
Expected result
Complete restore on JCB components
Actual result
Truncated restore, Displayed message is:
Error 0 The ciphertext has an invalid padding length (118) compared to the block size (16)
/home/.../libraries/phpseclib3/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/SymmetricKey.php:2597
System information (as much as possible)
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.
Thank you, I trust you will find a good solution.
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.