I see you do an isDefined, have you output the contents of form.variable to see whats in there? Just to make sure its what you expect and not something like a blank string.
 
-----Original Message-----
From: Erik Fenkell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 2002 3:17 PM
To: [EMAIL PROTECTED]
Subject: [CFTALKTor] Decrypting A form variable

I am having a helluva time decrypting a form variable that I have encrypted. I have no problem with an encrypted url variable just the form variable.
 
Here is some code to explain.
 
 
----------------------------------------------
<cfif IsDefined('url.variable')>
<cfset decrypted_url_variable = #Decrypt(url.variable,8)#>
<cfset url.variable = #decrypted_url_variable#>
<cfelse>
<!--- ::: DO NOTHING --->
</cfif>
 
<cfif IsDefined('form.variable)>
<cfset decrypted_form_variable = #Decrypt(form.variable,8)#>
<cfset form.variable = #decrypted_form_variable#>
<cfelse>
<!--- ::: DO NOTHING --->
</cfif>
----------------------------------------------
 
Yes, both variables have the same name. But they are different types. I thought this might cause a problem but even when I give
the variables different names the error is thrown. Here is the error:
 
----------------------------------------------

Error Diagnostic Information

An error occurred while evaluating the expression:

 decrypted_form_variable = #Decrypt(form.variable,8)#
The value to be decrypted is not valid
----------------------------------------------
I am at a serious loss. Thanks for any advice.
Best,
Erik

Reply via email to