tracker issue : CF-4043038

select a category, or use search below
(searches all categories and all time range)
Title:

cookies assigned with a NULL value are not recognized

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Steve Vail / Steve Vail (Steve Vail)

Created: 08/25/2015

Components: Language

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Windows 7

Vote Count: 0

Listed in the version 2016.0.03.300466 Issues Fixed doc
Problem Description: Users are granted access to specific features using cookies with Boolean flags.  A true value will obtain the specified access, but NULL is the default.  Now an error is given where, say, COOKIE.SUPERVISOR = "", now returns the error:  cookie.supervisor not found.

Steps to Reproduce: COOKIE.SUPERVISOR = "", <cfif cookie.supervisor is 1><cfset access="yes"><cfelse><cfset access="no"></cfif>

Actual Result:error:  cookie.supervisor not found.


Expected Result: access = "no"

Any Workarounds: yes. insert additional logic to set the cookie to 0 if it is not a true condition

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4043038

External Customer Info:
External Company:  
External Customer Name: Steve
External Customer Email:  
External Test Config: My Hardware and Environment details:  ms server 1008 r2

Attachments:

Comments:

Hi, There are a few queries we have: By default you say value is NULL, but when you use COOKIE.SUPERVISOR = "", you are setting it to empty string. That is different than null. Also, we tried the same configuration with null, empty string and some value in the string, and in none of the cases we were able to reproduce the cookie.supervisor not found issue. I always got access="no" as my value. Can you please share your exact code?
Comment by Kailash B.
6125 | October 07, 2015 04:48:17 AM GMT
I think I just stumbled upon the same problem. Here is how I was able to reproduce it: http://bjam.in/cf11-empty-cookie
Comment by External U.
6126 | December 13, 2015 10:24:04 AM GMT
I notice that the response headers are different in ColdFusion 11. In CF 10, an empty cookie is sent back as: NAME="" ... and in CF 11, the empty value is sent back as: NAME= ... notice that there are no quotes. Maybe the lack of quotes is causing the value to be nullified on the server. If so, the bug would be how the response headers are formed, not necessarily on how the request headers are parsed.
Comment by External U.
6127 | December 13, 2015 10:26:02 AM GMT
Hi Steve, Can you please share your code for us to replicate this issue?
Comment by Kailash B.
6128 | January 08, 2016 05:24:13 AM GMT