Save connection info in cookie

Bug #439113 reported by Jefficus
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glyphicus
Fix Committed
Medium
Xiaonuo Gantan

Bug Description

Currently, the account info for the MySQL connection must be entered by hand each time the app is run. We need to look into whether or not there is a persistence module like web cookies that can be used to store the connection info that has been used in the past and permit the user to re-select them from a drop down menu on the start-up dialog.

Ideally, this cookie would store not just the most recent connection info set, but all the info sets that have been used in the past.

Revision history for this message
Jefficus (jeff-smithicus) wrote :

There is a way to access cookie info from a Java applet. An example is available here: http://www.cookiecentral.com/code/javacook2.htm

Changed in glyphicus:
status: New → Triaged
importance: Undecided → Medium
Changed in glyphicus:
assignee: nobody → Nikolai Roman (xiaonuogantan)
Revision history for this message
Xiaonuo Gantan (xiaonuogantan) wrote :

I've fixed the bug. Right now the standalone Java application version of glyphicus can record the hostname and database name in the cookies. But I still have problem in setting up the correct Java applet version of glyphicus. It turns out to be some issues with the security settings of Java applets.

Changed in glyphicus:
status: Triaged → Fix Committed
Revision history for this message
Xiaonuo Gantan (xiaonuogantan) wrote :

Currently the program is able to remember which databases the user successfully connected. The cookies only exist for one running session of the program, which means if the user closes the program and reopens it, the program won't be able to remember which databases the user connected to last time. I'm not sure how long the user wants the cookie to last, so I defaulted the life cycle of the cookies to be only one running session. But if the user desires a longer time, we can change the life cycle of cookies.

Changed in glyphicus:
status: Fix Committed → Fix Released
Revision history for this message
Jefficus (jeff-smithicus) wrote :

That sounds excellent. The only thing I'd like you to change is the default duration. Make it 1 year. People are rarely going to log out and back in during a session. The real value of the feature is when it remembers their login data from one day to the next.

Changed in glyphicus:
status: Fix Released → In Progress
Changed in glyphicus:
status: In Progress → Fix Released
Revision history for this message
Xiaonuo Gantan (xiaonuogantan) wrote :

Currently the default expiry time of cookie is one year. This feature works fine under IE, Firefox, and Safari under Windows and Linux. However, it won't work under the Firefox in Mac OS X 10.6 due to an inherent bug in the Firefox implementation. Namely, the getCookie() method will constantly return null instead of the correct cookie if the program is working in Firefox under the Mac OS X 10.6 environment. In addition, this feature works under the Safari under the Mac OS X 10.6.

Revision history for this message
Jefficus (jeff-smithicus) wrote :

It's not obvious to me that this is working on my system. What is the proper behaviour?

I opened a project, opened a document and then closed the document and disconnected from the server. Then what?

If I try to create a new connection, it does not prompt me with any remembered servers to choose from. Is it broken, or am I doing something wrong?

Changed in glyphicus:
status: Fix Released → In Progress
Revision history for this message
Xiaonuo Gantan (xiaonuogantan) wrote :

It won't work under the Firefox due to an inherent bug and some incompatibility issue in the Firefox implementation. If you try Safari or IE, it should work. I tried it with Safari 4 with no problem.

Revision history for this message
Xiaonuo Gantan (xiaonuogantan) wrote :

There is a problem I've just found. The implementation cannot remember more than one connection. I will fix that tomorrow.

Revision history for this message
Xiaonuo Gantan (xiaonuogantan) wrote :

I've fixed the problem. Right now the glyphicus can remember more than one connection.

Changed in glyphicus:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.