Branch: Tag:

2018-01-19

2018-01-19 08:35:35 by Karl Gustav Sterneberg <kg@roxen.com>

Wizards: Adjustments after QA. [WS-143 / WS-135]

5320:    return secure ? "RoxenHttpsWizardId" : "RoxenHttpWizardId";   }    - string set_wizard_id_cookie(RequestID id, void|bool update_id) + string set_wizard_id_cookie(RequestID id)   //! Sets the RoxenWizardId cookie and returns the value of the cookie.   //!   //! @param id   //! @[RequestID] for which to set the cookie.   //! - //! @param update_id - //! If true, also updates the RequestID objects cookie map. - //! +    //! @returns   //! The value of the cookie.   {
5336:    // NB: The cookie is used from Javascript, so it can't have    // httponly set.    string name = get_wizard_id_cookie_name(id); -  string value = (string) (random(0x7ffffffe) + 1); +  string value = sprintf("%08x", random(0x7fffffff));    int expire_time_delta = 0;    string domain = 0;    string path = "/";
5350:    path,    secure,    httponly); -  if (update_id) { +     id->cookies[name] = value; -  } +     return value;   }