moeffju.net

StudiVZ in den Medien (Privatsphäre für Anfänger)

Jaja, die Leute schreiben immer noch übers StudiVZ. Also schreib ich jetzt endlich mal die Sachen auf, die ich in den letzten Monaten (seit meiner Anmeldung beim StudiVZ, Mitte September) so bemerkt habe.

Das mit den Bilder-URLs ist ja schon stadtbekannt. Natürlich machen alle anderen Großen - wie Xing, flickr, etc. - auch so, und das macht es nicht viel besser, aber das ist ja kein Grund, nicht darüber zu schreiben. Man kann also auf Bilder immer zugreifen, wenn man eine direkte URL hat. Na gut.

Viel interessanter fand ich: Die User-IDs sind nicht unique. Man kann die ersten 8-24 Bits (je nach Länge der ID) recht frei ändern und landet immer noch auf dem selben Profil. Das selbe gilt für die Album-IDs und vermutlich auch für die Bild-IDs. Na, was das wohl für ein Algorithmus ist… *hust*

Jedenfalls kann man so sehr leicht alle Benutzer, Alben und Bilder enumerieren, indem man der showalbum.php beliebige IDs in relativ großen Schrittweiten gibt. Wenn man einen Treffer hat, steht die ‘wahre’, primäre Album-ID (sowie Titel und Besitzer) im Seitenquelltext. Damit kann man dann den Bildserver behämmern. Für nicht-öffentliche Alben muss man dann nur den Rest des Suchraums durchgehen, oder man knackt einfach die ID-Erzeugung. Der Bilderserver geht jetzt schon merklich in die Knie.

Listen aller Alben eines Benutzers gibt’s bei showpeoplealbums.php, wobei auch hier gilt: etwa die Hälfte der ID ist eh wurscht. Es gibt verschiedene Meldungen für “Album ist noch leer” und “hat keine Alben”.

Immerhin hat man durch die eigenen IDs (3-6 Zeichen) gegenüber UUIDs (16-36 Zeichen) Traffic gespart…

Auch interessant: Das StudiVZ benutzt offenbar Smarty und sajax. Smarty, klar, sinnvoll. Sajax, auch sinnvoll, aber hoffentlich haben sie nicht zu viele Funktionen exportiert, auf die Normalsterbliche eigentlich gar nicht zugreifen können sollten. Na, wer will’s testen?

Was haben wir noch … ach ja, das mit den nichtöffentlichen Profilen? Geht ja auch grade durch die Welt… sei es nun friends.php oder profile_guestbook_large.php oder showpeoplealbums.php, man kann sich so ziemlich alle Teile eines “privaten” Profils ansehen. Hübsch. Da fällt auch das “Diese Nachricht wurde von Foobar gelöscht und wird anderen Mitgliedern nicht mehr angezeigt” nicht mehr ins Gewicht.

Hätte ich mich doch nur noch ein paar Wochen länger geweigert, da mitzumachen! Le seufz! Todo für morgen: Profile meiner Freunde scrapen, mein Profil löschen, Freunde per ICQ anhauen, done. Gute Nacht.

WordPress Official Comments

If you are using the Official Comments plugin with a recent WordPress version, you might be getting Database errors when you post a comment on your own blog. To fix these, open the official-comments.php file and change:

  • in line 27: $tableusers -> $wpdb->users
  • in line 40: $tablecomments -> $wpdb->comments

WordPress get_links

Actually I was only trying to get the list of links in the sidebar sorted by the time of their last update. Naïvely, I tried to just pass get_links() the ‘_updated’ parameter, but it didn’t work. Since the codex is more or less down, and googling using a search engine didn’t help much, I resorted to just reading the fine code. So, to answer my own questions for posteriority and those using a search engine to find out about get_links:

  1. passing ‘_updated’ should work; contrary to what some believe, it does not sort by ‘time you last edited the link’, but really tries to sort on ‘time the link last updated’;
  2. if it does not work, that’s probably because api.pingomatic.com is timing out since forever, despite ‘servers donated by automattic’;
  3. all blogroll-updating plugins I found do all sorts of weird things, but don’t work in the end; I for one t hink that asking any number of services for all changes they registered in the last 5 or 10 minutes and then manually filtering for entries in ones blogroll is, well, overkill, not to mention that it causes a load of unnecessary traffic on both ends;
  4. as of now, there doesn’t seem to be a plugin that does the obvious thing, namely to just check the goddamn RSS feeds I manually entered for every link in my blogroll!

which leads us to

  1. link lists in WordPress are in a sorry state of affairs, and
  2. I should probably write such a plugin.

Radfahrer: Jene im Dunkel

Straßenverkehrs-Ordnung (StVO)

I. Allgemeine Verkehrsregeln
§1 Grundregeln

  1. Die Teilnahme am Straßenverkehr erfordert ständige Vorsicht und gegenseitige Rücksicht.
  2. Jeder Verkehrsteilnehmer hat sich so zu verhalten, daß kein Anderer geschädigt, gefährdet oder mehr, als nach den Umständen unvermeidbar, behindert oder belästigt wird.

Liebe Radfahrer,

vielleicht ist euch noch nicht aufgefallen, durch die tollen Windschutz-Antireflex-Ski-und-Fahrrad-Brillen, aber wir haben Winter. Das bedeutet - unter anderem - dass es verdammt früh dunkel wird. Dunkel, das ist diese komische Himmelsfarbe - vielleicht wisst ihr, was ich meine.

Die Farbe, bei der man Licht am Rad haben sollte.

Ich gebe mir ja wirklich Mühe, Radfahrer nicht generell als Störenfriede und Straßenbesetzer zu sehen; ich weiche ihnen aus, parke nicht auf Radwegen, mache immer schön den Schulterblick und passe sogar auf, wenn ich die Tür öffne.

Wenn ihr aber meint, bei völliger Dunkelheit komplett in Grautöne gehüllt und ohne aktive Beleuchtung unterwegs sein zu müssen, kann ich für nichts garantieren. Ich habe mich darauf eingestellt, auf plötzliche Richtungs- und Spurwechsel vorbereitet sein zu müssen, ich fluche nicht mehr, wenn ihr über Fußgängerampeln fahrt oder mal eben den Bürgersteig benutzt, um Weg oder Ampeln zu sparen. Die einzige Voraussetzung für diese Rücksichtnahme aber ist, dass ich euch sehe!

Könntet ihr also bitte die verdammten Lampen an eurem Rad anschalten, wenn es dämmrig, dunkel, oder stockfinster ist? Und diejenigen, die jetzt sagen “Lampen? Wo?”: Bleibt daheim, oder wo auch immer, nur weg von den Straßen.

Als nächstes lernen wir dann, was es bedeutet, wenn eine Ampel rot zeigt.

(Und wenn ihr jetzt empörte Kommentare à la “Ich mach das aber immer gaaanz fein!” schreiben wollt, seid ihr höchstwahrscheinlich nicht gemeint.)

Die Emanzipation ist gescheitert, wenn...

Die Emanzipation ist gescheitert, wenn es in keinem Laden Haushaltshandschuhe in “groß” zu kaufen gibt und Staubsaugerrohre nur bis 1,40m ausziehbar sind.

Naja, Rücken is eh kaputt, der Rest ist Fingertraining.

Nevermore show cancelled

Okay, seriously, I’m sorry for Dane and I hope he gets better, but… the September 12th Nevermore gig in the Zeche in Bochum was supposed to be the super-special two-hour-plus DVD-recording show. People travelled from all over Germany, Europe, the US, even India(!) to see it… and then it’s cancelled and rescheduled with a one hour notice? Come on!

So, the new date for the show is October 11th. Tickets remain valid, etc.pp., but no one knows yet whether the rescheduled show will be the super-special one, or what. The cancellation news haven’t even made the band’s homepage so far except in the form of a forum thread.

Two days off work, some 800km and 12 hours of driving, and then… no show. Why does it always have to be the best gigs that get cancelled? Hey, Century Media, here’s an idea. Give every one of the owners of the 666 limited tickets for this special no-show the DVD for free, how’s that?

Oh, and give me a photo pass? ;)

MasterCard [lang_en]r[/lang_en][lang_de]R[/lang_de]ebranding

[lang_de] MasterCard rebranden. Von ihrem bekannten, zwei-farbige-verzahnte-Kreise-Logo zu einem neuen, das grundsätzlich sehr ähnlich ist, aber gerade unterschiedlich genug, um eine schlechte Idee zu sein.

Neues und altes MasterCard-Logo

Das neue Logo behält die zwei bewährten Kreise bei, rückt sie aber weiter auseinander und verkleinert sie. Die Verzahnung wird durch ein einfaches Überlappen mit Farbwechsel ersetzt, die Teile greifen also nicht mehr ineinander, sondern … invertieren sich? (Welche Message steckt hier bloß dahinter?) Als Zuckerguss auf dem Ganzen liegt dann ein dritter Kreis aus halbtransparenten Farbverläufen, so dass das Logo am Ende meiner Meinung nach eher nach einem Unfall beim Vektorzeichnen aussieht als nach einem passenden Image für eines der größten Kreditkartenunternehmen der Welt.

Zwei wichtige Punkte, die mir auf Anhieb einfallen:

  • Brand Awareness: Das MasterCard-Logo ist von überragender Bekanntheit. Zufällig ausgewählte Versuchspersonen konnten das Logo auf Anhieb fast immer recht genau wiedergeben. Sowas sollte man nicht leichtfertig aufs Spiel setzen.

  • Einfachheit: Das alte Logo benutzte drei Farben: Rot, gelb, und schwarz, konnte also mit nur zwei Schmuckfarben einfach wiedergegeben werden und skalierte auch gut “nach unten”, z.B. für zwei- oder einfarbigen Druck. Die Linien sind klar definiert und “easy on the eyes”.
    Das neue Logo hingegen klotzt gleich mehrere Farbverläufe in die Mitte des Logos und wird wohl immer nach Rasterung und Offsetdruck verlangen. Es ist auch schwer, sich das neue Logo z.B. einfarbig auf Textilien vorzustellen.

Letzlich entgeht mir wohl der Sinn des Rebrandings. MasterCard sagt dazu:

[die drei Kreise] reflect the company’s unique, three-tiered business model as a franchisor, processor and advisor

Ich schätze nur, dass es dem weit größeren Teil der Welt völlig Schnuppe ist, wie viele Geschäftsbereiche MasterCard hat - und dass der Teil, den es interessiert, es auch ohne das neue Logo wusste.

[/lang_de] [lang_en] MasterCard are rebranding. From their old, well-known, two-color interlocked circles logo to a new one which is basically the same, but just different enough to make the move stupid.

New and old MasterCard logos

The new logo keeps the two well-known circles, but moves them further apart and sizes them down. The interlocking is replaced by simply drawing the overlapping part in a different color, so the parts don’t intertwine anymore, instead they… invert? (What message are they trying to convey here?) The icing on top of it - literally - is a third circle filled with half transparent gradients, which results in the logo looking more like an accident in a vector graphics program than a fitting new image for one of the largest credit card issuers world wide.

Two important points that come to mind immediately:

  • Brand Awareness: The MasterCard logo is outstandingly well-known. Randomly selected persons could almost always reproduce the logo at first go. That’s not something one should risk lightly.

  • Simplicity: The old logo used three colors: Red, orange, and black, and could thus be reproduced using two spot colors. It also ‘scaled’ well to two color or even single color printing. The lines are well defined and easy on the eyes.
    The new logo instead uses multiple gradients in the middle of the logo and will always require rasterization and offset printing. It’s hard to imagine the new logo on fabric, for example.

Maybe I’m just missing the whole point of the rebranding. MasterCard state:

[the three circles] reflect the company’s unique, three-tiered business model as a franchisor, processor and advisor

I suppose, though, that the larger part of the population is completely uninterested to the number of business tiers of MasterCard - and that the part that is actually interested knew anyway.

[/lang_en]

MasterCard® is a registered trademark of MasterCard Worldwide.

IP to country: ip2countryd using hostip.info data

[lang_de]Dieser Eintrag ist nur auf Englisch verfügbar.[/lang_de]

hostip.info is a free GeoIP service. Unfortunately their webservice is slow and they are in the middle of a backend change (from 256 ip_X tables to one table listing all /24 nets…). However, their information is more exact than that of countries.nerd.dk.

To convert the data from hostip.info’s format into something remotely sane usable, you have to merge the ranges into CIDR-blocks per country. If you don’t do that, you’ll get a 160MiB result file which will take ages for ip2countryd to process. With proper optimization and merging, though, the resulting file is barely 4MiB in size and ip2countryd loads like a breeze.

  • ip2countryd-r3.tgz 12KiB
    Revision 3 of ip2countryd, minor changes, includes a script to convert hostip.info CSV dumps to rbldnsd format.
  • hostip-data.tgz 1.1MiB
    The current dump from hostip.info in rbldnsd format, including the cached version.

The test service at udp://ubermutant.net:8000/ has been updated to r3 with the hostip.info db.

Now, for the rant. hostip.info used to use 256 tables in their DB - one for each class A network. Inside each of these tables were two columns for the second and third octet of the IP. Luckily, they got better and away from this inane structure, switching instead to one table that holds the IP in a single INT column, as a long. But they still store one record for each /24 subnet in existence, plus some invalid and reserved ones (0.0.0.0/24? righto!). I don’t know how they query this monster, since the new site source is not yet available in their SVN, but I’m not sure if I even want to know. The sanest possibility I can think of right now is to take the lower 24 bits of the query and look that up. That still leaves one question, though: Why, oh why, must this be done in gigantic MySQL tables and for every single class C subnet?

Sometimes, a database just isn’t the best solution.

[lang_en]WordPress Statistics[/lang_en][lang_de]WordPress-Statistiken[/lang_de]

[lang_en] I recently installed WP-ShortStat to gather blog statistics, and especially to make them more easily accessible (compared to webalizer). WP-ShortStat claims that one should just drop it in the plugin directory and enable it and it would work. Well, guess what happened. [/lang_en] [lang_de] Ich habe vor kurzem WP-ShortStat installiert, um mal einfach verfügbare und lesbare (im Gegensatz zu Webalizer) Blog-Statistiken zu haben. WP-ShortStat behauptet, man müsses nur einfach nur ins Plugin-Verzeichnis legen, das Plugin anschalten, und es würde funktionieren. Ratet, was statt dessen passiert ist. [/lang_de] [lang_en] At first, no stats showed up. I didn’t think much of it, since I was logged in as admin and it really shouldn’t track my own visits. Then I tried with another browser, but still got no stats. I thought of blaming WP-Cache, which might prevent the tracking function from ever getting called, but didn’t have the time to look into it. Time passes. It still doesn’t work. The author seems to have disappeared off the face of the earth. Looking into the source, I fixed a few obvious bugs ($wpss->$tz_offset, rrrright!), but still, no go. Lots of googling later, I find a bugfix (the admin detection broke with wp2.x), and just after implementing it, a maintained version of the plugin… which actually works! It still looks broken though, because the columns don’t wrap right (a relic from the original version). Also, it’s slow since every request results in another request to an ip-to-country webservice. I kid you not. All that to save shipping with a “2mb ip-to-country file” (quote from the original author). Even with HappyArts’ optimizations, I prefer to use local data. Exit WP-ShortStat.

Enter WP-SlimStat. It’s a rewrite/conglomeration/bastardization/whatever of WP-ShortStat and something else, and it claims to fix all the bugs WP-ShortStat, have more features, be equally easily installed, and not break the WP admin area. Plus it can import WP-ShortStat data. Installation really is as easy as promised, and the admin panel looks neat and doesn’t break things.

Just don’t look at the main page.

For WP-SlimStat to work, you must have WPLANG defined and it must not be empty, lest you get a fatal error “Cannot instantiate non-existent class: CachedFileReader”. Most non-english blogs should be fine, the others should define('WPLANG','en'); in their wp-config.php.

I’m happy to report that after this little fix, things work. But the original author of WP-SlimStat still hasn’t incorporated the fix. What is it with writing stats plugins and disappearing?

I sense a conspiracy. [/lang_en] [lang_de] Zuerst erschienen einfach keine Statistiken. Ich hab mir nicht viel dabei gedacht, weil ich noch als Admin eingeloggt war, und das Plugin meine eigenen Besuche wirklich nicht mitzählen sollte. Also hab ich es mit einem anderen Browser versucht, aber immer noch keine Stats gekriegt. Ich dachte mir, dass es an WP-Cache liegen könnte, weil die Tracking-Funktion vielleicht nie aufgerufen würde, hatte aber keine Zeit, mir das ganze genauer anzusehen. Ein paar Tage später. Es geht immer noch nicht. Der Autor scheint vom Erdboden verschluckt worden zu sein. Im Source finde und behebe ich ein paar offensichtliche Bugs ($wpss->$tz_offset… äh, nein), aber mehr als leere Stats kriege ich trotzdem nicht. Viel googlen später finde ich einen Bugfix (die Admin-Erkennung geht mit WP 2.x nicht mehr), und kurz nachdem ich damit fertig bin, eine aktualisierte Version des Plugins… die sogar funktioniert! Leider sieht’s immer noch mies aus, weil die Spalten nicht richtig umbrechen (ein Relikt aus der Originalversion des Plugins). Außerdem ist es recht langsam, weil jeder Request eine Anfrage bei einem IP-to-Country Webservice nach sich zieht. Ernsthaft. Alles nur, um kein “2mb ip-to-country file” (Zitat Original-Autor) zu brauchen. Auch wenn HappyArts da noch einiges optimiert haben, ich mag lokale Daten. Abtritt WP-ShortStat.

Auftritt WP-SlimStat: Ein Rewrite/Zusammenballen/Bastardisieren/whatever von WP-ShortStat und anderen Scripts, behauptet, alle Bugs von WP-ShortStat zu beheben, mehr Features zu haben, genauso leicht installierbar zu sein, und das Admin Panel nicht zu zerhauen. Außerdem kann es die Daten von WP-ShortStat importieren. Die Installation ist auch wirklich so leicht wie versprochen, und das Admin Panel sieht nett aus und ist vor allem nicht völlig zerstört.

Die Hauptseite ist eine ganz andere Angelegenheit.

Damit WP-SlimStat funktioniert, muss die Konstante WPLANG definiert und nicht leer sein, weil man sonst einen Fatal Error “Cannot instantiate non-existent class: CachedFileReader” kriegt. Die meisten nicht-englischsprachigen Blogs sollten kein Problem haben, alle anderen sollten define('WPLANG','en'); in ihre wp-config.php eintragen.

Nach diesem kleinen Fix funktioniert netterweise endlich alles. Leider hat der Autor von WP-SlimStat den Bugfix immer noch nicht eingebaut. Warum verschwindet jeder, der Statistik-Plugins für WordPress schreibt, plötzlich?

Ich wittere eine Verschwörung. [/lang_de]

Wie Zähneputzen

Wenn Du nicht wählst, wählst Du Stalin!

(Auch nicht unsinniger als das hier. Jeder redet immer von Toleranz, aber keiner will die Anderdenkenden vom rechten Spektrum tolerieren. Irgendwie sinnig.)