Here is the VB Code in question:
Dim PORTALID As Integer = 0
If Not Context.Request.QueryString("fileticket") Is Nothing Then
Dim checkFileId As String = Context.Request.QueryString("fileticket")
Dim checkDecrypt As String = UrlUtils.DecryptParameter(checkFileId)
Dim URL As String = "FileID=" & UrlUtils.DecryptParameter(Context.Request.QueryString("fileticket"))
_FileName = GetHomeDirectory(PORTALID) & GetRelativeFilePath(URL, PORTALID)
Else
(The Else Code doesn't matter, removed it for this post)
End If
The Portal ID above is being set to 0 because the store inventory for any child portal is really on 0. Child portals are separate fund raiser projects that sell only items on 0.
The issue is, UrlUtils.DecryptParameter is portal aware. If the portal is actually greater than 0, it's trying to decrypt a file ticket for that portal. On portal 0, this code works, on any higher portal, the file ID doesn't get decrypted.
this can be solved by snagging the encryption key and using the 2nd method but I don't know what this key is or where it lives. I'm sure that's kept encapsulated for obvious reasons.
Another possible solution is write the decryption and insert it in the IF portion of the block prior to assembling _FileName.
I don't see an easy way around this. There isn't a way to set the Portal Context of the UrlUtils to 0, or some such trick like that.
Any ideas?