I encrypt a text "good-bye, friend" using BasicTextEncryptor
. So the encrypt value looks like below,
3qe80L1ap+cR2zRU9csFwOffw5NtWTueLRYgSXyjctI=
Then I email a URL to the user where the above parameter as a token.
Then the user copies the below URL and presses enter,
http://localhost:8080/token=3qe80L1ap+cR2zRU9csFwOffw5NtWTueLRYgSXyjctI=
But when I access the parameter in Struts 2 application through the action method it gives me the encrypt parameter as below,
3qe80L1ap cR2zRU9csFwOffw5NtWTueLRYgSXyjctI=
The +
is replaced by " "
. So when I decrypt it, it gives me EncryptionOperationNotPossibleException
.
Does struts decode the +
to " "
assuming browser +
is a encode character? In that case it ok before I proceed with decrypt, I replace the space with +
?