[
https://jira.jboss.org/browse/JBAS-8156?page=com.atlassian.jira.plugin.sy...
]
Adeeb Abdulkarim updated JBAS-8156:
-----------------------------------
Description:
When cookie is set and then get the value get surronded by double quotes.
E.g.
Cookie appCookie = new Cookie("applpath", "/MyAppRoot");
resp.addCookie(appCookie);
Accessing at client side (JS)
function getColorCookie(sName) {
var aCookie = document.cookie.split("; ");
for (var i=0; i < aCookie.length; i++) {
var aCrumb = aCookie[i].split("=");
if (sName == aCrumb[0])
return unescape(aCrumb[1]);
}
return null;
}
Expected Result: applpath = /MyAppRoot
Actual Result: applpath = "/MyAppRoot"
My inference:
Using servlet API when cookie is stored and retrieved, the double quotes may
be handled.
When cookie is set using servlet API and read at client side (JS/Applet etc)
the quotes introduced are NOT ignored.
was:
When cookie is set and then get the value get surronded by double quotes.
E.g.
Cookie appCookie = new Cookie("applpath", "/MyAppRoot");
resp.addCookie(appCookie);
Accessing at client side (JS)
function getColorCookie(sName) {
var aCookie = document.cookie.split("; ");
for (var i=0; i < aCookie.length; i++) {
var aCrumb = aCookie[i].split("=");
if (sName == aCrumb[0])
return unescape(aCrumb[1]);
}
return null;
}
Expected Result: applpath = /MyAppRoot
Actual Result: applpath = "/MyAppRoot"
When cookie is set and retrieved, the value get surronded by double
quotes
--------------------------------------------------------------------------
Key: JBAS-8156
URL:
https://jira.jboss.org/browse/JBAS-8156
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Environment: Linux 2.6.18-92.el5xen #1 SMP Tue Apr 29 13:31:30 EDT 2008 x86_64
JBOSS Version: jboss-eap-4.3.0.GA CP06
Reporter: Adeeb Abdulkarim
When cookie is set and then get the value get surronded by double quotes.
E.g.
Cookie appCookie = new Cookie("applpath", "/MyAppRoot");
resp.addCookie(appCookie);
Accessing at client side (JS)
function getColorCookie(sName) {
var aCookie = document.cookie.split("; ");
for (var i=0; i < aCookie.length; i++) {
var aCrumb = aCookie[i].split("=");
if (sName == aCrumb[0])
return unescape(aCrumb[1]);
}
return null;
}
Expected Result: applpath = /MyAppRoot
Actual Result: applpath = "/MyAppRoot"
My inference:
Using servlet API when cookie is stored and retrieved, the double quotes may
be handled.
When cookie is set using servlet API and read at client side (JS/Applet etc)
the quotes introduced are NOT ignored.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira