Forum Discussion
Brian_69413
Nimbostratus
Nov 12, 2007Conversion error for b64encode
I am encrypting username and password values from the [HTTP::payload] of an HTTP_RESPONSE and decrypting those same values on an HTTP_REQUEST. The values encrypt fine and I can log them as such. The decoding, however, fails saying that there is a conversion error. I have confirmed that it is in fact passing it the the encrypted values and using the same key. Is there something I am missing? Did the encrypted values get messed up when I parse them out of the request?
Thanks for the help!
- hoolio
Cirrostratus
I assume you're referring to the rule from your previous post (Click here)? - Brian_69413
Nimbostratus
We are running 9.4.2. - hoolio
Cirrostratus
Can you post a longer sample of the before and after? - Brian_69413
Nimbostratus
Original Encrypted Value: rDTgkrSbSZ7002v4NOCStJtJnvTTc5TfCvAYBaXl6E587VHDQT2ynFakvgg== - hoolio
Cirrostratus
I'm still missing the answer. Can you add log statements to log your key, and the user/pass pre- and post-encryption and then post the log output and your rule? - Brian_69413
Nimbostratus
I believe you are correct. It looks like the form is messing it up. I will talk with our app guys. - Brian_69413
Nimbostratus
The issue appears to be the special characters inroduced by the encryption. Is there any way to encrypt without the introduction of special characters? Thanks - Brian_69413
Nimbostratus
I have eliminated some of the issues with special characters and hex, but it is still giving the decoding error. - hoolio
Cirrostratus
Hi ormeb, - Brian_69413
Nimbostratus
The solution is to use the following before the decryption process:set decoded_data [URI::decode $encrypted_data]
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects