| Summary: | [Help] Criteria Scopes are not restored properly | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Chris Austin <ChrisAustin> | ||||||
| Component: | User Assistance | Assignee: | Chris Goldthorpe <cgold> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | cgold | ||||||
| Version: | 3.6 | Flags: | ChrisAustin:
review+
|
||||||
| Target Milestone: | 3.6 RC1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Chris Austin
Created attachment 167211 [details]
Patch to fix scope cookie encoding
I have attached a patch which seems to resolve this issue, though I still don't quite understand the mechanics. By also running URLCoder.compactEncode() on the commas used for criteria separation, I can ensure that part of the string to be saved to the cookie has some encoding (rather then just the sporadic 'z' here and there, commas always get encoded in compactEncode). As long as one part of the string is encoded, the restore works as expected.
I have seen this bug but I do not see it consistently. I have seen it show up in IE8 but I have only reproduced it a few times and I don't know why it only ocassionaly shows up. Created attachment 167406 [details] Patch which adds fix to UrlCoder and includes tests I have been able to reproduce the problem consistently and have reached the same conclusions. We discussed the bug and this is what we agreed. The problem is rooted in the saving of prohibited characters in a cookie, in particular the ',' character. See http://www.w3.org/Protocols/rfc2068/rfc2068 for a list of these characters (search for tspecials ). This can cause the cookie value to be read incorrectly at the server side, whether the cookie is read correctly or not seems to depend on whether it contains any encoded characters. The solution is to encode these special characters where possible. UrlCoder.compactEncode() was not encoding '/' so I have fixed that also. a '<' character also gets written to the cookie, this has been the case for some time but it is considered safer to not change that part of the logic. This patch also includes Chris A's original patch and some new tests which test for illegal characters being written to the cookie. Chris A please review the patches to UrlCoder and InfocenterWorkingSetManager - you don't need to review the new tests (unless you want to). Unfortunately, it looks like there is still a bug, even with my original patch or the new one. The crieria seems to save / restore properly for the UI dialog. However, if you try to select only criteria with z in the names, the actual filtering on the TOC does not take place. For example, I select 'Uncategorized' and the book does not show up, even though there are uncategorized topics in it. But if I select Linux and Uncategorized, both the Linux and uncategorized topics display properly. OK - ignore my last comments. Chris G realized that some of my topics had criteria that was not applied to the parent topic. I have opened Bug 312107 to address inheritance as a separate issue. In the meantime, this patch works well - we should commit it and close out the bug. Patch committed to HEAD, Fixed |