Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tim 1193 posts 2655 karma points c-trib
    Dec 08, 2009 @ 13:29
    Tim
    0

    Bug in Session/Cookie code

    Hi,

    I've spotted what appears to be a bug in contour. If you insert the placeholder for a cookie into the email template as part of a workflow send email item, for example [%myCookie], and the cookie doesn't exist for some reason (say it hasn't been set, has expired, user has cookies off), then the site throws a null reference exception, as it's not checking if the cookie exists before it gets the value.

    I've not tested it on the main site yet, so it may be the

    umbraco.BusinessLogic.StateHelper.GetSessionValue

    function that needs to check the cookie exists, or its one of the workflowservices methods.

  • Tim 1193 posts 2655 karma points c-trib
    Dec 08, 2009 @ 13:39
    Tim
    0

    It looks like its the GetSessionValue function (same issue for the GetCookieValue function).

    Is this by design? I'd normally check that the session/cookie existed and return string.empty if its no there, precisely to avoid these kind of errors, as there's all sorts of reasons why a cookie might be missing.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies