Michal Čihař - Archive for 2/2012

Cleaning up websites, say goodbye to Twitter

Finally I've found some time to do small cleanup on my websites. First of all I've removed links to my Twitter and Identi.ca profiles as they are dead and I don't think I'm going to make them alive any time soon. I never really got into this business and only used it as one interface to feed posts to Facebook (via Identi.ca's app there). Together my mostly read only Facebook usage, there is nothing going on there.

While touching the website code, I also did some cleanup on Wammu website (where Twitter and Identi.ca still stays as announcement media for new versions). Most notable change is that I've reduced usage of external (and in times heavy) javascript and links to social media are now just static HTML, which also nicer fit into website layout. It did indeed remove several options, but I don't think these were worth of the load it introduced.

Secure your phpMyAdmin

phpMyAdmin is quite popular software (to give some numbers let's mention 10000 downloads daily on SourceForge.net or 122685 reports in Debian's popcon) and as such is quite attractive target for various scripted attacks. If you run phpMyAdmin installation somewhere you should really make sure it is enough secured, so that these script kiddies don't get through.

In past month I've looked at what kind of attacks are these guys trying and in all cases these are pretty old vulnerabilities, some of them fixed years ago. So the first thing you should do is to update. It is always good to run latest stable version, but in case you can not for whatever reason, try at least taking the most important fixes and using them.

In ideal world your distribution would do this job for you, but in case it did not, you can for example take patches from Debian, which is pretty good at taking our patches (surprisingly it is not much related to my involvement there). To check which patches they have applied you can use excellent patch-tracker tool, which exposes patches from all released packages.

To give you overview of which issues are mostly being attempted to exploit by script kiddies right now, here is the list:

  • PMASA-2010-3 - yes, more than two years old, but still unpatched in some places
  • PMASA-2011-5 - "only" half year old
  • PMASA-2011-6 - only useful together with wrongly configured PHP

If you have fixed these, you should be pretty safe for now, but follow our security announcements for possible future issues (you can use RSS feed or subscribe to news mailing list, where all security issues are announced as well).

However there are more things you can do to keep you safer:

  • remove setup directory from phpMyAdmin, you will probably not use it after initial setup
  • prevent access to libraries directory from browser, as it is not needed, supplied .htaccess file does this
  • properly choose authentication method - cookie is probably the best choice for shared hosting
  • in case you don't want all MySQL users to be able to access phpMyAdmin, you can use AllowDeny rules to limit them
  • consider hiding phpMyAdmin behind authentication proxy, so that MySQL credenticals are not all users need to login

So these are the basic steps which will help you against possible compromise, I might return to some of these in more details in future posts.

Yet another project...

Okay, I'm probably really incorrigible. Not long ago, I've publicly complained that I have too many projects to work on and now I just got commit access to another one (after bothering Richard too much with my patches). Anyway I don't expect to contribute much to colorhug client, but somehow it happened that I needed to fix few bits and that lead to finding another bits to fix.

Also I hope I won't have to touch much of other software in color management stack. Playing with Little CMS was nice experience, though I'd still prefer to be user in this area :-).

phpMyAdmin translations status

With first RC for phpMyAdmin 3.5, we're really close to final release, so let's again look at translations status. Here comes fourth round of translation status update.

Since last update we have three new translations at 100%:

  • Czech
  • English (Great Britain)
  • Estonian
  • French
  • Japanese
  • Russian
  • Slovenian
  • Spanish
  • Swedish
  • Turkish

There are few which are really close to 100% and I hope they will get there soon:

  • Danish
  • Dutch
  • Italian
  • Polish

As you can see, there is still lot of languages missing, this might be your opportunity to contribute to phpMyAdmin.

Looking for Pootle alternative

For some time, we use Pootle as online translation tool for phpMyAdmin. It is indeed great tool, but somehow we seem to be hitting more and more issues with it and I feel it really won't fit nicely once we will want to support translations on two divergent branches. Also it's code base is not something easy to understand so that I would be able to fix bugs myself without major effort.

So this is when I started to look for alternatives. Unfortunately there is nothing I could find what would work in way I want. I've looked at Transifex, Translatewiki, Crowdin and others whose names I've forgotten and I still haven't found what I'm looking for.

The key feature I want from such system is full integration with git. This means that whatever is changed should be committed to local git branch and merging translations back should be as easy as merging remote branch. I've hacked such thing into Pootle (in quite dirty way), so this is basically workflow we have right now and I'm pretty much happy with that.

Another thing (which seems to be existing in some tools) is support for simultaneous translation of more branches - if same string exists in more branches, it should be translated in all of them. And last but not least, it should support import of po files allowing users offline translation.

Thinking about this I'm starting to thing that it should be pretty easy to implement something what I want using existing pieces of software without major effort. I'll probably start to play with Django, translate-tookit and GitPython to see if I can come up with something working reasonably well in few days...

PS: Anybody working on updated GitPython packages for Debian, looks like I will need them soon :-).

PS 2: The solution for me is Weblate.