prevent single chunk encrypted urldata from being read as two RRS feed

  • Question

  • User379720387 posted

    I am using the SSTCryptographer to hide some urldata.

    SetUpEntry/61X61 gets encrypted as /SetUpEntry/F/GovUPp6Bm=

    On the decryption side:

    string urldata = SSTCryptographer.Decrypt(UrlData[0]);

    it reads F, rather than the whole thing.

    This has been working really well for several month except the 61X61 creates an extra "/"

    Is there a way to tell the browser to consider  "F/GovUPp6Bm=" as one single chunk of UrlData?

    Wednesday, January 21, 2015 8:21 PM

All replies

  • User879242426 posted

    This has been working really well for several month except the 61X61 creates an extra "/"

    why it can't work with the 61X61 creates an extra "/"?

    Friday, January 23, 2015 4:02 AM
  • User379720387 posted

    The browser then thinks there are two pieces of urldata, while the code assumes one.

    I can remediate that by re-assembling the encrypted string, but I like to keep the code simple.

    Friday, January 23, 2015 8:07 AM
  • User753101303 posted


    As you are puttting this on a url you should use UrlEncode so that / is properley escaped (using  a querystring). Or maybe base64 but you'll have to decode that explicitely. The point is that AFAIK you just can't have / as part as a route and expect it to not be treated as a path separator.

    Tuesday, February 3, 2015 11:30 AM
  • User-2051275383 posted

    Not sure if my input helps - But if I was trying to obscure something in the URL.. I would just use a GUID in the URL string and perhaps another method to transport 'hidden' information (ie. Session)..

    Tuesday, February 10, 2015 6:02 AM
  • User379720387 posted

    encoded = "61X61" and so is decoded?

    string linkdata = "61X61";
        string encoded = HttpUtility.HtmlEncode(linkdata);
        string decoded = HttpUtility.HtmlDecode(encoded);

    Tuesday, February 10, 2015 9:41 AM