Ask a Question related to Coldfusion Security, Design and Development.
-
DixieGal #1
Encrypt () places punctuation in string
:(
I am encrypting a user password just before storing, the decrypting anytime it
is retrieved. All works great, except for passwords that where the encryption
places a ' or a " in the encrypted string. Then my SQL Server query fails
because it trips up on the quotations....
My query looks like:
update table set username=' #form.username#',
pw='#encrypt(FORM.password,'XXX')#' where empid=#session.user.empid#
I have tried the query several ways, including assigning the encrypted value
to a var and then putting it in the query.... All are a no-go...
Any suggestions as to how I can either
1) ELIMINATE certain characters from my string
2) Create an encryption that is only alphanumeric or
3) Get the query to work as is....
Tx, DixieGal
DixieGal Guest
-
Encrypt String or different approach
Good afternoon, I am building an application that uses ASP .NET, and Blackmoon FTP Server, My plan currently is to automate some user processes... -
function that removes the punctuation and some characters like (*&^%$#@!<>?"} from a text string
Hi All; I'm trying to create an ASP function called CleanX that removes the punctuation and some characters like (*&^%$#@!<>?"}|{..) from... -
Query String - encrypt
All, I often use a querystring in my ASP pages. for example: if val > 1 then Response.redirect "val1.asp?val=1&user=UserID End if Is there a... -
How can I encrypt a string?
hi... How can I encrypt a string and then decrypt it? there are some examples I found but all of them about filestream object I wonder if there... -
Encrypt string for POSTing
Hi all! I need to POST data from one of my asp.net pages to an external CGI script. What possibilities do I have to encrypt the data for... -
Adam Cameron #2
Re: Encrypt () places punctuation in string
> 3) Get the query to work as is....
Read up on <cfqueryparam>
--
Adam
Adam Cameron Guest
-
eastinq #3
Re: Encrypt () places punctuation in string
The ToBase64() works well also for storing encrypted passwords in a text field.
<cfset pw="Tom'sCabin">
<cfset enc_pw=Encrypt(pw,"XXX")>
<cfset b64_pw=ToBase64(enc_pw)>
<cfset dec_pw=Decrypt(ToString(ToBinary(b64_pw)),"XXX")>
<cfoutput>
password: #pw#<br>
encrypted: #enc_pw#<br>
base64: #b64_pw#<br>
decrypted: #dec_pw#<br>
</cfoutput>
eastinq Guest



Reply With Quote

