nobled: (spiral transparent)
nobled ([personal profile] nobled) wrote2009-09-03 02:01 am
Entry tags:

user agent strings

Under /manage/logins, you can see your past login sessions, including the User-Agent string of the browser you were using at the time. However, a really long user-agent string(Hello, Google Chrome) gets cut off for some reason. Looking at the code, it calls up the string from the database table loginlog, column ua, which Googling revealed is probably limited by its type being VARCHAR(100). Which is really unfortunate, since most of the interesting version information seems to be at the end of the UA string these days. Mayhaps a switch to VARCHAR(200) is in order, to give it some breathing room.

grep'ing for where the database scheme might be set in the code(turns out, in shows a few other fields with the same size:

./bin/upgrading/    subject VARCHAR(100) DEFAULT NULL,
./bin/upgrading/    ua        VARCHAR(100)
./bin/upgrading/    class    VARCHAR(100),
./bin/upgrading/    class     VARCHAR(100),
./bin/upgrading/    class     VARCHAR(100),
./bin/upgrading/    handle VARCHAR(100) PRIMARY KEY,
./cgi-bin/LJ/AccessLogSink/                "browser VARCHAR(100),".
./cgi-bin/LJ/AccessLogSink/                "clientver VARCHAR(100),".
./cgi-bin/LJ/         browser VARCHAR(100),
./cgi-bin/LJ/         clientver VARCHAR(100)

Now I wonder how bad I can break my dreamhack if I just edit that Perl script to say VARCHAR(200) and run it...