Skip to content

Illegal base64 character encountered in PrivateKeyDecrypter.doDecrypt for unencrypted values that contain -  #234

Description

@hansenmc

When the PrivateKeyDecrypter is configured and an unencrypted value contains - an IllegalArgumentException is thrown and uncaught, resulting in errors that prevent CoRB from running.

java.lang.IllegalArgumentException: Illegal base64 character 2d

	at java.util.Base64$Decoder.decode0(Base64.java:714)
	at java.util.Base64$Decoder.decode(Base64.java:526)
	at java.util.Base64$Decoder.decode(Base64.java:549)
	at com.marklogic.developer.corb.PrivateKeyDecrypter.doDecrypt(PrivateKeyDecrypter.java:155)
	at com.marklogic.developer.corb.PrivateKeyDecrypterTest.testDoDecryptValueWithDashes(PrivateKeyDecrypterTest.java:260)

Instead of throwing, the IllegalArgumentException should be caught and simply log that it was unable to decrypt the (unencrypted) value.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions