>What is the best way to hide/encrypt/disguise a url in an action statement
in CF5, >especially if they view source?
Apologies.. typo (late night).
Terry,
With these functions you can hide the page and or url variables. You encrypt
it on the form and then unencrypted it on the other end. You can't encrypt
the domain itself.
<cfscript>
application.key = "whateveryouwant";
// encrypt a url
function url_encrypt(astring, key) {
encryptedstring = tobase64(encrypt(trim(astring),trim(key)));
return encryptedstring;
}
url_encrypt('login.cfm?avar=1', application.key);
// decrypt a url
function url_decrypt(passed_url, key) {
unencryptedstring =
URLDecode(decrypt(tostring(tobinary(trim(passed_url))),trim(key)));
return unencryptedstring;
}
url_decrypt(encryptedstring, application.key);
</cfscript>
---
[This E-mail has been scanned for viruses.]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186455
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54