Avant Calendar Applet won't save my password

Bug #229538 reported by J.M. Hardin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Awn Extras
Confirmed
Undecided
Michael Rooney

Bug Description

The Clock/Calendar applet by Mike Desjardins refuses to remember my Google Calendar password. I believe I got it from the bzr, following reacocard's instructions on the AWN thread on UF (http://ubuntuforums.org/showthread.php?t=385981).

Steps to Reproduce:
1. Activate the Clock/Calendar Applet in awn-manager (I believe it's the one inspired by NeXTstep's Dock Clock but I'm not sure. The About panel should have Copyright 2007 Mike Desjardins)
2. In the applet's Preferences window select integration with Google Calendar
3. In the login window enter your username and password, checking the box to save the password
4. In the dialog that pops up verify that you want AWN to remember your password

What Should Happen:
The dialog and preferences window should both close and the applet logs into your google Calendar to populate the applet's display. In addition the next time you start AWN the Clock/Calendar Applet should start without asking you to log in

What Actually Happens:
The confirmation dialog closes but the Preferences window stays open and you're not logged into your calendar.

Running AWN 0.3.1 on Ubuntu Hardy with the following hardware specs:
* Intel(R) Celeron(R) CPU 2.20GHz
* 748 MiB RAM, 1074 total Swap
* an Nvidia GeForce2 MX 100/200

Revision history for this message
moonbeam (rcryderman) wrote :

I can confirm this bug exists. As far as I know it has always been present.

Changed in awn-extras:
assignee: nobody → desjardinsmike
status: New → Confirmed
Revision history for this message
J.M. Hardin (jmhardin) wrote :

I knew saving passwords is a long-term issue, but I only started seeing this particular behavior since I reinstalled Hardy. I just can't remember exactly when I started seeing so I didn't want to say how long I've been experiencing it. Plus I should have filed this bug back when I first saw it and didn't, so...

My bad.

Revision history for this message
Daniel Shepherd (daniels-7) wrote :

I think this is the same issue that I ran into with the Calendar applet. When trying to enter/save my password for my Google Calendar account the credentials dialog would not close and the password would never be saved. Also eventually clockcal.py would crash.

The problem (at least in my situation) was that the crypt() function in the calendarlogin.py and clockcal.py files will sometimes return a string that contains a NULL byte in the form of "\x00" or other hex codes. Mine contains "\x01" and "\x00". So when the calendarlogin.py program attempted to store the crypted password in the gconf schema it would give an error. Something about may not contain NULL bytes.

I'm trying to learn python so I decided it would be fun to dig around in the code, I ended up fixing the problem by using repr() and eval().

Code I changed:

(calendarlogin.py)

line 101 old: saved_password = self.crypt(self.password.get_text(),17760704)
line 101 new: saved_password = repr(self.crypt(self.password.get_text(),17760704))

I use repr() which will format your string so that the aforementioned hex characters are "escaped" with an extra backslash.
--------------

(clockcal.py)

line 173 old: self.password = tmp.password
line 173 new: self.password = eval(tmp.password)

The above pulls the password from gconf and puts it in tmp_password to make sure it isn't empty before putting it in "password" I just added the eval() to reverse the changes repr() makes.

After these changes my Google calendar works fine and I have an applet that doesn't crash and stores my password.

*Disclaimer: I am in no way an experienced or even halfway decent programmer/developer, I made these changes out of necessity and they may break other stuff.

Revision history for this message
Daniel Shepherd (daniels-7) wrote :

Never mind about using eval()...now that I understand fully what it does or can do it definitely shouldn't be used for this purpose. Any other way to extract the repr() password string back to its original state prior to passing it to be decrypted?

Revision history for this message
moonbeam (rcryderman) wrote :

I think ultimately it should make use of gnome-keyring.

I believe there is some support for it in AWNlib.

Revision history for this message
pavpanchekha (pavpanchekha) wrote :

There is support in AWNLib (probably the best support you can find :)), but as far as I know, the AWN Calendar applet does not use AWNLib (having been written before it existed) and worse, is no longer maintained. I may try to hack keyring support in, but don't count on it any time soon - if someone else has the time, that would be better.

Revision history for this message
Nicola Jelmorini (jelmorini) wrote :

I have this problem too.
I have updates AWN from PPA just this morning, 17 august 2008, but the problem is still present.
If I reboot the PC, user and password setting for Google Calendar are lost, and the Calendar Applet has "none" as calendar integration.
If I stop and restart AWN the Calendar Applet can't access to the Google Calendar and a message is displayed. I attached here an image.

Revision history for this message
Michael Rooney (mrooney) wrote :

Assigning to me, I will see if I can port the relevant code to AWNLib and get this properly working again.

Changed in awn-extras:
assignee: desjardinsmike → michael
Mark Lee (malept)
tags: added: applet calendar
Revision history for this message
Thomas Spigel (thomas-spigel) wrote :

Patch for package awn-extras-applets-python-extras version 0.3.2.2-2ubuntu1 on ubuntu karmic
# cd /usr/share/avant-window-navigator/applets
# sudo patch -p0 < calendar.patch
I used the eval / repr method previosly explained. I know it's a temporary workaround but it's better than having a buggy calendar if you need it.

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.