Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
Description
adouma (I am fixing this in the securitydomain branch since so simple)
I you do not yet have a cookie in your browser but want to vote on a poll, the code incorrectly assumes that you do not have cookie support via
protected String getPersistentValue(HstRequest request, String pollDocumentName) { if (request.getCookies() == null) { return NO_COOKIE_SUPPORT; } String name = getCookieName(request, pollDocumentName); for (Cookie cookie : request.getCookies()) { if (name.equals(cookie.getName())) { return cookie.getValue(); } } return null; }
The workaround trick for this is to always set a dummy cookie during the rendering of the poll first. Then if cookie support is on in the browser, the vote request will have cookies for sure