Solved

mask url coldfusion

Posted on 2007-11-15
4
900 Views
Last Modified: 2012-05-05
I am trying to pass variables without posting or passing thorugh the url, is there anyway to do this???

Is there a way to encrypt or maskl what is going through the url???

thanks

Judson
0
Comment
Question by:judsonmusic
  • 2
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
mrigsby earned 500 total points
ID: 20292639
You could encrypt the values using the Encrypt(string, key) function.

For Example...


On Initial Page:
 

<cfset DataToBeEncrypted = URLEncodedFormat("This is the Text That Will Be Encrypted")>

<cfset DataToBeEncrypted = Encrypt(DataToBeEncrypted, "MyKey")>

<cflocation url="http://www.mysite.com/index.cfm?Info=#DataToBeEncrypted#" addtoken="No">
 
 

Index.cfm:
 

<cfset DeCryptedData = Decrypt(url.Info, "MyKey")>

<cfset DeCryptedData = URLDecode(DeCryptedData)>

<cfoutput>DeCryptedData</cfoutput>

Open in new window

0
 
LVL 3

Author Comment

by:judsonmusic
ID: 20300483
this is giving me and error saying that it wont allow carriage returns. I am trying to pass #form.password# and #form.username#

now what??
0
 
LVL 5

Expert Comment

by:mrigsby
ID: 20300535
Can you post your actual code your using
0
 
LVL 3

Author Comment

by:judsonmusic
ID: 20300696

FORM THE INITIAL PAGE
 
 

    <cfset user = #URLEncodedFormat(trim(form.username))#>

    <cfset pass = #URLEncodedFormat(trim(form.password))#>

    <cfset user = Encrypt(user, "MyKey")>    

    <cfset pass = Encrypt(pass, "MyKey")>

    <cflocation url="https://www.mysite.com/index.cfm?user=#user#&pass=#pass#"addtoken="No">                 
 
 
 

THE CATCH PAGE:
 
 

<cfif isdefined('url.user') AND isdefined('url.pass') AND url.user neq '' and url.pass NEQ ''>

<cfset user = Decrypt(url.user, "MyKey")>

<cfset pass = Decrypt(url.pass, "MyKey")>

<cfset form.username = URLDecode(user)>

<cfset form.password = URLDecode(pass)>

</cfif>

Open in new window

0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article  is about submitting  form through  ColdFusion.Ajax.submitForm to the action page and send a response back in JSON format which later can be decoded using ColdFusion.JSON.decode. By this way you can avoid the usual page refresh for subm…
Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now