Activity log for bug #942134

Date Who What changed Old value New value Message
2012-02-27 18:11:58 Thomas Berezansky bug added bug
2012-02-27 18:13:00 Thomas Berezansky tags pullrequest staff-client pullrequest staffclient
2012-05-16 14:04:38 Thomas Berezansky description The initial commit message is reproduced below the link to the branch. This is a significant enough change that I feel that more than just one person should review it, and discussion in IRC has brought up the thought of "have everyone describe exactly what they tested to ensure we get decent coverage". As a note, I included the work from the following bugs while building/testing the branch for this one: Bug #921740 - External sites can be opened in the staff client This has a component that needed to be re-written to support later XULRunner versions, and would *not* have worked in Extension mode in any satisfactory manner. Bug #923868 - AccessControl plugin no longer extracts properly I needed that fix to test clean builds of installers that auto-update. In addition, this covers Bug #628378 (Remote XUL support going away in Gecko 2) and may help correct Bug #491537 (xulrunner 1.9 (and Firefox 3.5) prints garbage to certain printers) by introducing a significantly later XULRunner version. In the interest of documenting what has and has not been tested, I touched on the following: Basic Circ Functions, Basic Admin functions (a number of config menus in particular), Automatic Updates, Installer Building, basic receipt printing, Vandelay loads (but I didn't test much beyond that), and minimal reporter testing. Generally I bounced through random parts of the system I knew enough about to check things in, looking for anything that wasn't working, and tried to hit interfaces I didn't know enough about to ensure that they at least appeared to load without errors. I don't have a comprehensive list of them, though. http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/tsbere/new_xulrunner XULRunner/Firefox 4+ change the rules significantly, and to support them significant changes have to be made in Evergreen. This commit covers a number of things: 1 - Remote XUL Issues Later versions of XULRunner disable support for Remote XUL without using a whitelist entry, and whitelisting may stop working eventually as well. The solution here is the addition of a new protocol wrapper that allows Remote XUL to act like Local XUL. The wrapper is oils:// and acts like HTTPS for the most part. The "host" the client connects to is always "remote", however, and use of the wrapper has multiple effects. The first of these effects is the enabling of Remote XUL content, with as close to the Local XUL security level as I could manage. This means that nearly anything Local XUL can do, Remote XUL should be able to do too. The second of these effects is the disabling of JavaScript-visible cookies. XUL doesn't have cookies, and as such a side effect of the wrapper allowing remote content to appear to be local content is the lack of cookies. This does *not* affect server side visibility of cookies, however, so things like TPac can still see cookies. The third of these effects is the "hiding" of the hostname for anything going through the wrapper. This prevents oils_persist from saving things correctly. I thus made oils_persist check for the wrapper and use the data stash to get the hostname instead. I suspect that we can get rid of the location.hostname check entirely at this point, but have not done so. The wrapper also sets a request header of OILS-Wrapper, value of 'true'. That allows the server to know that the request came through the wrapper. I used that ability to have TPac go into "Staff" mode when the wrapper is in use. This will enhance extension use, where the same authtoken will be seen by both the staff client and Firefox browsing. I willi also note that I rigged the wrapper to be easily adjusted for a second, hard-coded host for selfcheck use, using oils://selfcheck instead of oils://remote, that could be very easily turned into a minimal Firefox extension. That would enable the selfcheck code to have permission to work with printers and such without enablePrivilege (see next section). 2 - enablePrivilege Deprecation The enablePrivilege security model has been removed and no longer functions, and the staff client depended heavily upon it. The Remote XUL fix provided us with a way to fix the enablePrivilege issues, however. Because the Remote XUL has the Local XUL security context it doesn't need enablePrivilege anymore. However, because enablePrivilege no longer functions for those things *not* loaded through the wrapper some things had to be changed. For one, because if you are loaded through the wrapper you can't see cookies, and if you can see cookies you can't do "XUL" things, the "XUL" cookie has been removed. However, the wrapper can be detected by the protocol you are using, so I added protocol checking to the isXUL checks I know of. I am unsure about what, if anything, to do about the IAMXUL flag that is set by the browser code, though. For two, the JavaScript OPAC needs to be passed through the wrapper for some staff functions to work currently. This has the additional side effect of effectively forcing SSL mode for JSPac regardless of other settings. For three, I went ahead and removed all enablePrivilege calls I could find outside of the selfcheck code. As they no longer work they were just extra cruft. 3 - Component changes Component loading has changed significantly, and the easiest way to accommodate the changes was to re-write our components. The command line handler and force external components (the latter from another branch of mine) were simple enough, especially as they aren't interacted with by other code in the system (and as I wrote them I understood them anyway). While I was at it I made the force external component more extension-friendly. The data stash, however, was using a hack to accomplish what a singleton component could do more easily. That and I couldn't get it to function as it was. My solution was to re-write it as a singleton, removing the interface definition that was not needed. As I changed how it functioned so significantly I had to update all calls to it. In addition, I hid a window loading routine in the data stash component for easier loading of a *single* main Evergreen window from the Firefox overlays. 4 - Extension changes First off, Venkman, the DOM Inspector, and Chrome List are not guaranteed compatible with XULRunner anymore. As such, I have removed the out of date versions. Instead, I have added routines for loading Venkman and the DOM Inspector as Extensions. This keeps them easy to update to later versions, and makes us play much nicer when we are an extension. Also, now the buttons/menu items for loading these interfaces disable themselves if the extensions don't appear to be loaded. A side effect of that was that Windows installers compressed with zlib were unhappy. I switched to solid lzma, which in theory will get us smaller file sizes too. Secondly, Extensions have changed significantly in Firefox 4+, and Evergreen had to be adjusted to deal with some of the changes. I adjusted the overlay to take into account the new application menu, and I re-wrote the hotkey set loading routines to deal with the fact that extensions don't get extracted by default. 5 - Staff Client Build Process XULRunner has some changes that needed accounting for, such as a root level chrome.manifest being needed. Extension mode, as mentioned above, needed tweaks as well, and other issues were run into along the way. Both XULRunner and Firefox version support has been extended to 10.* and the base XULRunner download has been bumped to 10.0.2. In addition to the changes needed to support later XULRunner versions, I also included alternate application name support, my fix for the AccessControl plugin extraction, and support for OS-specific branding folders. Mainly because I ended up using all of them in testing, and decided to leave them in afterwards. 6 - Miscellaneous tweaks In addition to everything else, while I was running through my various tests I changed a few other things. I enabled the navigation buttons on the OPAC interface embedded in the patron overview for hold placement. With Remote XUL having the same security context as Local XUL they now work. I removed all non-SSL authtoken cookie assignments I could find, and flagged all the SSL ones I could find as being "secure" cookies. On the subject of cookies, I also told the logoff code to not erase every cookie, as those running in extension mode might dislike all cookies going away. I know that during my testing I disliked it, anyway. I removed the code that messes with the user agent. Extensions are basically not allowed to do that, and I don't think we need, or should rely on, a modified user agent elsewhere, so adding a check specifically for when we are not an extension didn't make a lot of sense to me. I also made it so that the automatic login command line options will work after a logoff (but they won't trigger a logoff) during a testing run where I was logging off, clearing cache, and logging in again repeatedly. To deal with CSS changes I changed most (but not all) popup elements to menupop elements. Popups in later XULRunners are transparent by default. In the reporter I found that "class" was being used as a variable name, but that is a reserved keyword. I changed it to aClass. The initial commit message is reproduced below the link to the branch. This is a significant enough change that I feel that more than just one person should review it. It has been being used on Jason Stephenson's development machine for a while now, though. As a note, I included the work from the following bugs while building/testing the branch for this one: Bug #921740 - External sites can be opened in the staff client This has a component that needed to be re-written to support later XULRunner versions, and would *not* have worked in Extension mode in any satisfactory manner. In addition, this covers Bug #628378 (Remote XUL support going away in Gecko 2) and may help correct Bug #491537 (xulrunner 1.9 (and Firefox 3.5) prints garbage to certain printers) by introducing a significantly later XULRunner version. In the interest of documenting what has and has not been tested, I touched on the following: Basic Circ Functions, Basic Admin functions (a number of config menus in particular), Automatic Updates, Installer Building, basic receipt printing, Vandelay loads (but I didn't test much beyond that), and minimal reporter testing. I touched on MARC View/Edit when errors were being generated there. Generally I bounced through random parts of the system I knew enough about to check things in, looking for anything that wasn't working, and tried to hit interfaces I didn't know enough about to ensure that they at least appeared to load without errors. I don't have a comprehensive list of them, though. http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/tsbere/new_xulrunner Commit message: Improve Firefox/XULRunner Support XULRunner/Firefox 4+ change the rules significantly, and to support them significant changes have to be made in Evergreen. This commit covers a number of things: 1 - Remote XUL Issues Later versions of XULRunner disable support for Remote XUL without using a whitelist entry, and whitelisting may stop working eventually as well. The solution here is the addition of a new protocol wrapper that allows Remote XUL to act like Local XUL. The wrapper is oils:// and acts like HTTPS for the most part. The "host" the client connects to is always "remote", however, and use of the wrapper has multiple effects. The first of these effects is the enabling of Remote XUL content, with as close to the Local XUL security level as I could manage. This means that nearly anything Local XUL can do, Remote XUL should be able to do too. The second of these effects is the disabling of JavaScript-visible cookies. XUL doesn't have cookies, and as such a side effect of the wrapper allowing remote content to appear to be local content is the lack of cookies. This does *not* affect server side visibility of cookies, however, so things like TPac can still see cookies. This required fixing a lot of places that were built to read data like authtokens out of cookies. The third of these effects is the "hiding" of the hostname for anything going through the wrapper. This prevents oils_persist from saving things correctly. I thus made oils_persist check for the wrapper and use the data stash to get the hostname instead. I suspect that we can get rid of the location.hostname check entirely at this point, but have not done so. The wrapper also sets a request header of OILS-Wrapper, value of 'true'. That allows the server to know that the request came through the wrapper. I used that ability to have TPac go into "Staff" mode when the wrapper is in use. This will enhance extension use, where the same authtoken will be seen by both the staff client and Firefox browsing. I willi also note that I rigged the wrapper to be easily adjusted for a second, hard-coded host for selfcheck use, using oils://selfcheck instead of oils://remote, that could be very easily turned into a minimal Firefox extension. That would enable the selfcheck code to have permission to work with printers and such without enablePrivilege (see next section). 2 - enablePrivilege Deprecation The enablePrivilege security model has been removed and no longer functions, and the staff client depended heavily upon it. The Remote XUL fix provided us with a way to fix the enablePrivilege issues, however. Because the Remote XUL has the Local XUL security context it doesn't need enablePrivilege anymore. However, because enablePrivilege no longer functions for those things *not* loaded through the wrapper some things had to be changed. For one, because if you are loaded through the wrapper you can't see cookies, and if you can see cookies you can't do "XUL" things, the "XUL" cookie has been removed. However, the wrapper can be detected by the protocol you are using, so I added protocol checking to the isXUL checks I know of. I am unsure about what, if anything, to do about the IAMXUL flag that is set by the browser code, though. For two, the JavaScript OPAC needs to be passed through the wrapper for some staff functions to work currently. This has the additional side effect of effectively forcing SSL mode for JSPac regardless of other settings. For three, I went ahead and removed all enablePrivilege calls I could find outside of the selfcheck code. As they no longer work they were just extra cruft. 3 - Component changes Component loading has changed significantly, and the easiest way to accommodate the changes was to re-write our components. The command line handler and force external components (the latter from another branch of mine) were simple enough, especially as they aren't interacted with by other code in the system (and as I wrote them I understood them anyway). While I was at it I made the force external component more extension-friendly. The data stash, however, was using a hack to accomplish what a singleton component could do more easily. That and I couldn't get it to function as it was. My solution was to re-write it as a singleton, removing the interface definition that was not needed. As I changed how it functioned so significantly I had to update all calls to it. In addition, I hid a window loading routine in the data stash component for easier loading of a *single* main Evergreen window from the Firefox overlays. 4 - Extension changes First off, Venkman, the DOM Inspector, and Chrome List are not guaranteed compatible with XULRunner anymore. As such, I have removed the out of date versions. Instead, I have added routines for loading Venkman and the DOM Inspector as Extensions. This keeps them easy to update to later versions, and makes us play much nicer when we are an extension. Also, now the buttons/menu items for loading these interfaces disable themselves if the extensions don't appear to be loaded. A side effect of that was that Windows installers compressed with zlib were unhappy. I switched to solid lzma, which in theory will get us smaller file sizes too. Secondly, Extensions have changed significantly in Firefox 4+, and Evergreen had to be adjusted to deal with some of the changes. I adjusted the overlay to take into account the new application menu, and I re-wrote the hotkey set loading routines to deal with the fact that extensions don't get extracted by default. 5 - Staff Client Build Process XULRunner has some changes that needed accounting for, such as a root level chrome.manifest being needed. Extension mode, as mentioned above, needed tweaks as well, and other issues were run into along the way. Both XULRunner and Firefox version support has been extended to 12.* and the base XULRunner download has been bumped to 12.0. In addition to the changes needed to support later XULRunner versions, I also included alternate application name support and support for OS-specific branding folders. Mainly because I ended up using all of them in testing, and decided to leave them in afterwards. 6 - Miscellaneous fixes MARC View was building a data URL and dumping it into an attribute without escaping it. Apparently this made XULRunner unhappy, so I added in escaping. 7 - Miscellaneous tweaks In addition to everything else, while I was running through my various tests I changed a few other things. I enabled the navigation buttons on the OPAC interface embedded in the patron overview for hold placement. With Remote XUL having the same security context as Local XUL they now work. I removed all non-SSL authtoken cookie assignments I could find, and flagged all the SSL ones I could find as being "secure" cookies. On the subject of cookies, I also told the logoff code to not erase every cookie, as those running in extension mode might dislike all cookies going away. I know that during my testing I disliked it, anyway. I removed the code that messes with the user agent. Extensions are basically not allowed to do that, and I don't think we need, or should rely on, a modified user agent elsewhere, so adding a check specifically for when we are not an extension didn't make a lot of sense to me. I also made it so that the automatic login command line options will work after a logoff (but they won't trigger a logoff) during a testing run where I was logging off, clearing cache, and logging in again repeatedly. To deal with CSS changes I changed most (but not all) popup elements to menupop elements. Popups in later XULRunners are transparent by default. Also for CSS changes, a menubar CSS entry in global.css was causing issues with menu visibility on Linux. Things look fine without it, so I went ahead and removed it outright. In the reporter I found that "class" was being used as a variable name, but that is a reserved keyword. I changed it to aClass. To make things easier for url_prefix use I made it so that the urls hash is checked by the url_prefix function. It looks for names up to the first of several characters: /, ?, |. If urls contains that name it is replaced into place. For | the | itself is removed in this process.
2012-06-15 16:54:54 Bill Erickson nominated for series evergreen/2.3
2012-06-15 16:54:54 Bill Erickson bug task added evergreen/2.3
2012-07-17 15:10:16 Thomas Berezansky evergreen/2.3: milestone 2.3.0-alpha2
2012-07-19 15:38:38 Jason Stephenson evergreen/2.3: milestone 2.3.0-alpha2 2.3.0-beta1
2012-07-30 14:57:51 Dan Scott evergreen: status New Fix Committed
2012-07-30 14:57:54 Dan Scott evergreen/2.3: status New Fix Committed
2012-07-30 14:57:57 Dan Scott evergreen: milestone 2.3.0-beta1
2012-09-19 19:57:56 Jason Stephenson evergreen: status Fix Committed Fix Released
2012-09-19 20:02:12 Jason Stephenson evergreen/2.3: status Fix Committed Fix Released