Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

mask url coldfusion

Posted on 2007-11-15
4
Medium Priority
?
928 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
mrigsby earned 1500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The technique is by far very Simple! How we can export the ColdFusion query results to DOC file?  Well before writing this I researched a lot in Internet but did not found a good Answer anyways!  So i thought now i should share my small snippet w…
CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

609 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