inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jul 18, 2014 10:50:21 GMT -8
Thanks Misaka, I see it now and have already identified a bug which would not otherwise be easily spotted. The plugin uses DOM storage for image persistence but has the facility to fallback to using cookies on the off chance that DOM is not supported or more likely has been disabled by the user. I used the built-in proboards.cookie function ( pb.cookie simply calls it) not realizing that although it URI encodes both the name and the value of the cookie when writing the cookie it makes no effort to decode when retrieving. I would view this as a bug ( Tim Camara?) although easily worked around by making sure to use encodeURIComponent (on name) when trying to read a cookie and also remembering to decode the returned value yourself. [ edit note: this could cause double-encoding if corrected in the future by PB, I sort of recall some kind of problem with double-encoding if the string contains the "%" char which could be incorrectly interpreted on the second pass if followed by the wrong chars] I'll update the plugin to account for this
|
|
Misaka
Full Member
Yozakura Quartet: Hana no Uta
Posts: 912
inherit
179763
0
Oct 11, 2024 19:07:51 GMT -8
Misaka
Yozakura Quartet: Hana no Uta
912
May 2012
hellsingfan
|
Post by Misaka on Jul 18, 2014 11:03:14 GMT -8
ok & thanks
"typing right-handed is difficult"
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jul 18, 2014 12:41:25 GMT -8
Misaka the plugin has been updated to v0.0.2 : -- decodes value in cookie mode and also encodes cookie name when fetching to avoid false negatives. -- cleanup stored image when going from a timed rotation cycle to a random-image-on-every-pageview mode "left is easier"
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on Jul 18, 2014 13:11:06 GMT -8
Thanks Misaka, I see it now and have already identified a bug which would not otherwise be easily spotted. The plugin uses DOM storage for image persistence but has the facility to fallback to using cookies on the off chance that DOM is not supported or more likely has been disabled by the user. I used the built-in proboards.cookie function ( pb.cookie simply calls it) not realizing that although it URI encodes both the name and the value of the cookie when writing the cookie it makes no effort to decode when retrieving. I would view this as a bug ( Tim Camara?) although easily worked around by making sure to use encodeURIComponent (on name) when trying to read a cookie and also remembering to decode the returned value yourself. [ edit note: this could cause double-encoding if corrected in the future by PB, I sort of recall some kind of problem with double-encoding if the string contains the "%" char which could be incorrectly interpreted on the second pass if followed by the wrong chars] I'll update the plugin to account for this Since I happened to be working in the plugin area today anyway, I went ahead and fixed this so it properly decodes the cookie when reading. Watch the dev blog for when it goes out live.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jul 18, 2014 13:55:50 GMT -8
Misaka, given that welcomed news from Tim, I'd hold off updating the plugin until that fix is in place
|
|
Misaka
Full Member
Yozakura Quartet: Hana no Uta
Posts: 912
inherit
179763
0
Oct 11, 2024 19:07:51 GMT -8
Misaka
Yozakura Quartet: Hana no Uta
912
May 2012
hellsingfan
|
Post by Misaka on Jul 18, 2014 15:26:36 GMT -8
Misaka, given that welcomed news from Tim, I'd hold off updating the plugin until that fix is in place ok then I've given you powers as well to help others ^_^
|
|