Welcome Guest, Not a member yet? Register   Sign In
encryption class: problem when using encrypted string as part of url
#1

[eluser]vickel[/eluser]
by chance I observed the following:

I've encoded a string "WE7896" and sometimes get back the encoded string with 2 trailing '==' like "ABCetc=="

if I decode "ABCetc==", I get my original string back ("WE7896"), no problem

next I want to decode the url segment of an url like "http://mysite.com/review/ABCetc==", BUT I get the "Disallowed Key Characters" error: so I've tried adding '\=' to the system/core/Input.php (@function _clean_input_keys), but that didn't make any difference.

right now, my solution is after encoding to replace the '==' like this:
Code:
$url_segment=str_ireplace("==","",$url_segment);

and I decode the the url segment 'ABCetc' nicely back into 'WE7896'

which works fine !
but seems strange to me

P.S.: I was able to repeat above using different $config['encryption_key'] strings

please advise
thanks





Theme © iAndrew 2016 - Forum software by © MyBB