all, I’m having a problem with my wordpress page while using encrypted $_GET parameters to obtain data. this is my function:
function encryptDecrypt($key, $string, $decrypt)
{
if($decrypt)
{
$decrypted = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), base64_decode($string), MCRYPT_MODE_CBC, md5(md5($key))), "6");
return $decrypted;
}else{
$encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5(md5($key))));
return $encrypted;
}
}
I’m using the registered user’s mail to encrypt it and to retrieve his data using $_GET parameter. The problem is that if i use the normal email address (not encrypted, which it will be quite useless and dangerous) the $_GET request works. If i use an encrypted email, I only get a 404 Error.
This is what I’ve tried so far:
$m=urlencode(encryptDecrypt('mail',$mail,false));
$msg.="<br><a href="https://wordpress.stackexchange.com/questions/170179/siteurl/pageurl/?m=".$m."">Click here</a>";
Example of encrypted mail which is used in the URL to send data:
VOvk4Wh%2FpMzm21lQNrFnvBcwRWLw6ZVPOMe0VCi2t3g%3D
and, in the “retrieving” page:
urldecode($_GET['m']);
Example of encrypted mail which is used in the URL to retrieve data:
VOvk4Wh/pMzm21lQNrFnvBcwRWLw6ZVPOMe0VCi2t3g=
When i open the “receiving” page with that link i get the 404 Error
UPDATE+
I’ve solved the problem, which was the ‘m’ as $_GET parameter, which is a wordpress’s default taxonomy… Thanks to you all for helping me. 🙂