Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.0.1, EE 3.0.0
-
Fix Version/s: 3.1
-
Component/s: Push Library
-
Labels:None
-
Environment:ICEpush
Description
In our own org.icepush.http.standard.Cookie class, there is a readCookie method that tries a couple of different strategies to get at the request cookies.
The code in the "backup" logic (after it tries to use getHeader() method which typically doesn't work with portlets) tries this alternative approach but doesn't check for null if nothing is returned:
//PUSH-144: as the Cookie header may not always be available (e.g. portlets) we try an
//alternate approach
javax.servlet.http.Cookie[] treats = request.getCookies();
--> need a null check here
for (int i = 0; i < treats.length; i++) {
javax.servlet.http.Cookie treat = treats[i];
if (treat.getName().equalsIgnoreCase(cookieName)) {
return new Cookie(treat.getName(), treat.getValue());
}
}
The code in the "backup" logic (after it tries to use getHeader() method which typically doesn't work with portlets) tries this alternative approach but doesn't check for null if nothing is returned:
//
//alternate approach
javax.servlet.http.Cookie[] treats = request.getCookies();
--> need a null check here
for (int i = 0; i < treats.length; i++) {
javax.servlet.http.Cookie treat = treats[i];
if (treat.getName().equalsIgnoreCase(cookieName)) {
return new Cookie(treat.getName(), treat.getValue());
}
}
Activity
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #29013 | Fri May 11 14:41:46 MDT 2012 | deryk.sinotte | |
Files Changed | ||||
MODIFY
/icepush/trunk/icepush/core/src/main/java/org/icepush/http/standard/Cookie.java
|
Deryk Sinotte
created issue -
Deryk Sinotte
made changes -
Field | Original Value | New Value |
---|---|---|
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] | |
Assignee | Deryk Sinotte [ deryk.sinotte ] |
Evgheni Sadovoi
made changes -
Salesforce Case | [5007000000MFoJQ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Null check added.