Hello,
I am having a little problem with my function to encrypt the query strings....
Code:
Function encryptMenu(HTMLstring)
Dim objRegExp : Set objRegExp = New RegExp
Dim expressionMatch, expressionMatched, strTemp
With objRegExp
.Pattern = "(\?)[(\w\.\&*)+(\=)[\w\d ]*"
.IgnoreCase = True
.Global = True
End With
Set expressionMatch = objRegExp.Execute(HTMLstring)
If expressionMatch.Count > 0 Then
For Each expressionMatched in expressionMatch
strTemp = Right(expressionMatched.value, (Len(expressionMatched.value)-1))
'Alert strTemp
HTMLString = Replace(HTMLString, strTemp, EncryptQS(QSCleanup(strTemp), Salt()))
Next
'Alert HTMLString
encryptMenu = HTMLString
Else
'Response.Write "<B>" & objRegExp.Pattern & "</B> was not found in the string: <B>" & StringToSearch & "</B>."
End If
Set objRegExp = Nothing
Set expressionMatch = Nothing
End Function
' Perform the necessary cleanup to the QueryString.
Function QSCleanup(QS)
QSCleanup = Replace(QS, "&", "&")
End Function
Now, I correctly pick out the query string (everything after the "?"), and for most entries it works fine....However, I have a couple of them that even though I pick out the query string, it doesnt replace the whole thing...for example:
noretrieve=true&rptid=jax212&dbcode=2&leasepro_id= 1000018528&udb_id=100001.8528&usertype=V
becomes...
noretrieve=true&rptid=jax212&ENC_QfsJ/OaMUZ1cHMjPnUEM4o8C2+tdI/173ET767CvDXE4CEHmTyc5eWNTwinaV+/lI0K5idTSH32yKg+myuvdjA==
it should just be ...
ENC_QfsJ/OaMUZ1cHMjPnUEM4o8C2+tdI/173ET767CvDXE4CEHmTyc5eWNTwinaV+/lI0K5idTSH32yKg+myuvdjA==
Anybody have an idea as to why this is happening?
Thanks!