Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 55f11ae

Browse files
author
zhourenjian
committed
Fix bug of SimpleStore on IE: use Cookie directly for IE visitors, other browser users will use XSS Cookie
1 parent a961ea5 commit 55f11ae

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

sources/net.sf.j2s.ajax/store/net/sf/j2s/store/SimpleStore.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ private SimpleStore() {
1616
* @j2sNative
1717
* var ua = navigator.userAgent.toLowerCase ();
1818
* var isIE = (ua.indexOf ("msie") != -1);
19-
* var isIE6OrEarlier = isIE && ((ua.indexOf ("msie 6.0") != -1)
20-
* || (ua.indexOf ("msie 5.5") != -1) || (ua.indexOf ("msie 5.0") != -1));
2119
* var cookieURL = window["j2s.xss.cookie.url"];
2220
* var isLocal = window.location.protocol == "file:";
23-
* if (!isLocal && cookieURL != null && !isIE6OrEarlier) {
21+
* if (!isLocal && cookieURL != null && !isIE) {
2422
* this.store = new net.sf.j2s.store.XSSCookieStore(cookieURL);
2523
* } else {
2624
* this.store = new net.sf.j2s.store.CookieStore();

sources/net.sf.j2s.ajax/store/net/sf/j2s/store/XSSCookieStore.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
* @j2sSuffix
1010
* var ua = navigator.userAgent.toLowerCase ();
1111
* var isIE = (ua.indexOf ("msie") != -1);
12-
* var isIE6OrEarlier = isIE && ((ua.indexOf ("msie 6.0") != -1)
13-
* || (ua.indexOf ("msie 5.5") != -1) || (ua.indexOf ("msie 5.0") != -1));
1412
* var xssCookieURL = window["j2s.xss.cookie.url"];
1513
* var isLocal = window.location.protocol == "file:";
16-
* if (!isLocal && xssCookieURL != null && !isIE6OrEarlier) {
14+
* if (!isLocal && xssCookieURL != null && !isIE) {
1715
* net.sf.j2s.store.XSSCookieStore.initialize(xssCookieURL);
1816
* }
1917
*/

0 commit comments

Comments
 (0)