R2i DotNetNuke® Forum

R2i wants you to have the opportunity to ask questions, post reviews, help others or just rant and rave about DotNetNuke® or any of the R2i Modules and Skins. Our team spends hour upon hour, day after day, working on custom DotNetNuke® modules and services; please feel free to ask us anything.
 
Redirecting to external url encrypted
Last Post 26 May 2009 03:39 PM by AlexK. 7 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Informative
arijkensUser is Offline
New Member
New Member
Posts:18

--
03 Dec 2008 11:08 AM  
Hello,

I want to link to an external url and have to pass some variables. The external url is an ASP site.

The link is something like: http://www.exturl.com/read.asp?username=john&password=qwerty

As you see the username and password are not encrypted.

Is is possible to:
- redirect to an external url with encrypted variables?
- redirect using a new window (_blank)? With action redirect I only redirect in the same window.

I read about the ENCRYP/DECRYPT formatters and I can of course encrypt the url variables. However on the receiving end (in the file read.asp) i have to decrypt. I do not know how.

BTW, I can change the asp file on the receiving end.

any suggestions would be welcome!

Arjan
AlexKUser is Offline
Basic Member
Basic Member
Posts:128

--
03 Dec 2008 11:17 AM  
Hi arijkens,

I'm trying to accomplish something similar. However, somehow transfering encrypted parameters seem troublesome.

Usually, the encrypted data ends with an '='. This '=' is skipped when grabbing the parameter using [name,Querystring], thus the decrypted value is always empty, or the same as the encrypted value minus the '='. This can be resolved by always put an '=' at the end of the encrypted data when decrypting.

However, sometimes the encrypted data ends with two '='s, or a forward slash, for instance. This forward slash results in ListX always throwing an exception.

Using ENCODEURI/DECODEURI formatters does not resolve this. I haven't got a clue how to go around these issues. Maybe a custom encryption method is in order. Does ENCODEURI/DECODEURI resolve your problem?

Best regards,
- Alex.
arijkensUser is Offline
New Member
New Member
Posts:18

--
03 Dec 2008 11:38 AM  
Hello Alex,

Does that not give me the same problem? Everything I do on the source part (ENCRYPT/ENCODEURI/..) I have to undo in de receiving part (the asp that handels the request). If I would be capable to DECRYPT/DECODEURI in the receiving ASP I would be saved;-)

thanks for your quick response!

Arjan
AlexKUser is Offline
Basic Member
Basic Member
Posts:128

--
03 Dec 2008 12:04 PM  
Hi Arjan,

If you have access to the ASP code, you can use a decode function for the URL encoded part. I don't know what ListX uses as encryption routine. Anyone else maybe?

To decode the URL encoded string, you could use:

Function URLDecode(sConvert)
Dim aSplit
Dim sOutput
Dim I
If IsNull(sConvert) Then
URLDecode = ""
Exit Function
End If

' convert all pluses to spaces
sOutput = REPLACE(sConvert, "+", " ")

' next convert %hexdigits to the character
aSplit = Split(sOutput, "%")

If IsArray(aSplit) Then
sOutput = aSplit(0)
For I = 0 to UBound(aSplit) - 1
sOutput = sOutput & _
Chr("&H" & Left(aSplit(i + 1), 2)) &_
Right(aSplit(i + 1), Len(aSplit(i + 1)) - 2)
Next
End If

URLDecode = sOutput
End Function

Still, I'm hoping that anyone (willing to share the secret) has succesfully transfered encrypted data by querystring ...

Regards,
- Alex.
AlexKUser is Offline
Basic Member
Basic Member
Posts:128

--
03 Dec 2008 03:14 PM  
Arjan,

This probably will not help you, though for future reference it might be useful to mention that I resolved my problem by replacing all '='s by '*'s. Of course I'm replacing all '*'s by '=' before I decrypt the value. ListX formatters can be nested through multiple levels, very nice.
I hoop you'll find your answer soon ...

Regards,
- Alex.
csaxenaUser is Offline
New Member
New Member
Posts:21

--
14 May 2009 09:00 PM  
I am trying to do something similar but I am trying to pass the encrypted variables to a Java URL. Do you know what kind of encryption mechanism is used by ListX and what would be the best way to decrypt it on the Java side?

Thanks,
Chhavi
csaxenaUser is Offline
New Member
New Member
Posts:21

--
14 May 2009 09:00 PM  
I am trying to do something similar but I am trying to pass the encrypted variables to a Java URL. Do you know what kind of encryption mechanism is used by ListX and what would be the best way to decrypt it on the Java side?

Thanks,
Chhavi
AlexKUser is Offline
Basic Member
Basic Member
Posts:128

--
26 May 2009 03:39 PM  
csaxena,

I tried to figure this out a while ago, but I haven't succeeded. Its proprietary, you'll need some info from the developer(s) of this mechanism to tackle it. It would be nice if it had a standard encryption method. Maybe Open Web Studio has such an option?

Best regards,
- Alex.
You are not authorized to post a reply.

Active Forums 4.1
 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seatle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share