- π³π±Netherlands Marty2081
The decrypt() method potentially throws 2 types of Exceptions. This is a snippet from the comments in the interface:
* @throws \Drupal\encrypt\Exception\EncryptException * Thrown when decryption fails. * @throws \Drupal\encrypt\Exception\EncryptionMethodCanNotDecryptException * The method should throw this exception when the plugin can not decrypt * (i.e. use a public key).
- π³π±Netherlands Marty2081
Here is a patch that handles both exception types:
- Status changed to Needs work
over 1 year ago 8:29am 4 April 2023 - π¬π§United Kingdom nicrodgers Monmouthshire, UK
Hi Marty,
I can't see where EncryptionMethodCanNotDecryptException is handled in your patch #8, it looks like only the other exception is caught still.
- π³π±Netherlands Marty2081
Argh, I seem to have uploaded the wrong patch file. My bad.
- π³π±Netherlands Marty2081
My apologies, here is the correct path file.
- Status changed to RTBC
over 1 year ago 10:58am 4 April 2023 - π¬π§United Kingdom nicrodgers Monmouthshire, UK
Looks good to me, thanks Marty.
- π«π·France paul_leclerc Lausanne Switzerland
Hi,
The past could not be applied using :
the version : dev-1.x 40a690c
and the patch : 3284329-catch-exceptions-11.patch - First commit to issue fork.
- Merge request !9issue #3284329: Add patch 11 and catch exception on encryption too β (Open) created by abarrio
- πͺπΈSpain abarrio
On our project the exception was on encryption so I created a merge request with patch from #14 and added catching exception on encrypt method.