It’s pretty hard to argue with the idea of managing your bookmarks on a webpage. It avoids the hassle of unsynchronized local bookmarks scattered across different systems and browsers. Just remember ONE webpage, and you can get to all the rest!

A few years ago I went looking for code to let me do this from my server, giving me ultimate control. bookmark4u scratched my itch. I got on board with it when it still supported frames, which was exactly what I wanted. YES I LOVE FRAMES! Bugger off! 😛 The author didn’t agree, and dropped support a long time ago, so I cling to my older version. Even so, over the years, it has been ROCK SOLID and done everything I wanted (this may be the only software I have ever used for which this is true!).

A more recent update to Mysql (4.1 I believed) changed the internals of a common way of encrypting passwords, the PASSWORD(‘plaintext’) function. Example SQL:

insert into MY_PASSWORDS (‘webuser’, PASSWORD(‘webuserpswd’) );

select user from MY_PASSWORDS where password=PASSWORD(‘webuserpswd’);

More precisely, after some reading, I found that the PASSWORD() function is really intended for internal use by Mysql, and external use is not recommended. In version 4.1.1, the output from PASSWORD() was extended from 16 bytes to 41 bytes. Any apps that expect the older size no longer work. Cest la vie.

Of course, the problem is that bookmark4u uses it. What to do? The Mysql encryption docs give details on all the available encryption functions. SHA1() is recommended – it is cryptographically strong, and should be widely available. And perhaps most importantly, it is not likely to change out from under us. I replaced all calls to PASSWORD(‘blah’) with SHA1(‘blah’), which generates a long hash string for the password. Worked like a charm. The only thing I had to do besides search/replace PASSWORD( with SHA1( was to alter the password column to make it wider – 60 characters was recommended somewhere, and it did the job for me. Of course, we could have just extended the column in the first place, but why go halfway? That’s no fun! 😛

NOTE: This is now out of date, see the update here.

If you’re interested in open source at all, you don’t want to be without Sourceforge, where a lot of the world’s open source code resides. Strangely, it’s not obvious how to get code from Sourceforge if you’re behind a firewall that doesn’t have port 80, 443 or 2401 wide open. In other words, half of corporate America can’t access open source “out of the box”.

There are actually two ways to get code from Sourceforge. As a project developer with write permission, you use the CVS :ext: protocol, which tunnels through SSH. For anonymous access to anyone else’s code, you have to use the :pserver: protocol. Sourceforge has ports 80, 443 and 2401 (the default) set up for pserver.

With TortoiseCVS, you can do pretty much anything you need to with ext, because TortoiseCVS uses Putty for SSH, and Putty can use an HTTP proxy. Just specify a fully-configured Putty session name instead of a server when using :ext: under TortoiseCVS, and TortoiseCVS lets Putty use the session to set up the SSH connection.

I love TortoiseCVS, but at first blush it looks like it won’t do the job for anonymous Sourceforge access – you need pserver over an HTTP proxy and there are no TortoiseCVS settings for that. Fortunately, WinCVS fills this requirement. When you select Remote->Checkout Module, right there you can add the proxy information. Here comes the code! Rockin’!

But hold on! When WinCVS builds the pserver host string, it adds your proxy information in the following format:

CVSROOT=:pserver;username=anonymous;hostname=cvs.sourceforge.net;proxy=yourproxy.com;proxyport=##:/cvsroot/yourmodule

It appears that TortoiseCVS can actually use this format, now that it’s in the CVS/Root file, even though it’s not documented. Go to the CVS directory that WinCVS created, and you should be able to use the tortoise now! I suppose with a little manual copying/editing, you could set up CVS/Root files yourself and bypass the need for WinCVS, but I haven’t tried that yet. I recommend just kicking things off with WinCVS, it’s a breeze.

UPDATE: Under linux, the format is like this:

CVSROOT=:pserver;proxy=yourproxy.com;proxyport=##:[email protected]:/cvsroot/yourmodule

Don’t ask me why it’s different! Yuck. But these formats are working under Windows and linux. Go get some code!