Solved

mask url coldfusion

Posted on 2007-11-15
4
904 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

830 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