Community
Participate
Working Groups
Steps: 1) Go to CVS Repositories view 2) Open Properties dialog for any repo 3) Check "Save password" and press "Apply" 4) Close and reopen the dialog 5) The checkbox is not set
The same thing happens if you want to uncheck the option. It stays checked when the dialog is reopened.
(In reply to comment #0) > Steps: > 1) Go to CVS Repositories view > 2) Open Properties dialog for any repo > 3) Check "Save password" and press "Apply" > 4) Close and reopen the dialog > 5) The checkbox is not set If the checkbox is unchecked when you open the property page for the first time it indicates that the password isn't cached, we all know that. However, it can also mean that the pass is null even though there are some *****. Having null password will always result in the checkbox being cleared (see method CVSRepositoryLocation#getUserInfoCache which determines whether the checkbox should be checked or not). Szymon, can you confirm you have a valid password and the checkbox is still not set? (In reply to comment #1) > The same thing happens if you want to uncheck the option. It stays checked when > the dialog is reopened. Investigating...
See also bug 229987.
After a quick look, I think the main issue here is that previously CVSRepositoryLocation.flushCache used Platform.flushAuthorizationInfo which "Removes the authorization information for the specified protection space and given authorization scheme." and now, with Secure Storage on the board the flushCache method calls ISecurePreferences.flush() which "Saves the tree of secure preferences to the persistent storage.". I guess replacing it with ISecurePreferences..removeNode() should make the check box work as it used to. Adding Oleg on CC since I belive he's an expert in Secure Storage API.
Created attachment 108741 [details] Fix v01 Patch that adjust the way CVS uses Secure Storage. Unchecking the "Save password" checkbox for a CVS repository, removes the node from Secure Storage tree, but the password can be still used during current session. Szymon, could you apply it and check if it makes any difference?
Created attachment 108742 [details] mylyn/context/zip
Looks good to me. One thing I'd change to be on the safe side, is to add "node.flush()" after "node.clear()" in the removeNode() method (and then remove "flushCache();" call in the dispose()). This would save changes immediately rather then on Eclipse shutdown for the other calls to the removeNode().
Created attachment 109050 [details] Fix v02 Thanks for your comment Oleg. This is updated version of the previous patch.
Released to HEAD and 3.4.x branch.