Link: JSESSIONID considered harmful
Thursday, April 16th, 2009Craig Condit makes a strong case against JSESSIONID in JSESSIONID considered harmful. And I just learned that it is disabled by default in Grails 1.1.
Craig Condit makes a strong case against JSESSIONID in JSESSIONID considered harmful. And I just learned that it is disabled by default in Grails 1.1.
I just implemented elwell’s notify_via_jabber and it did not work at first. I got the following message in nagios.log:
I promptly apt-get installed libnet-xmpp-perl but the problem persisted — with the exact same error message. But Net::XMPP was now there!!
Well it happens that Embedded Perl Nagios (ePN) caches the compiled script and does not try to recompile it until its timestamp changes. So I touched(1) the script and this time the dependency was resolved correctly and the script was compiled sucessfully.
This is probably documented somewhere, but I could not find any reference to this kind of problem with Nagios cached scripts so I tought I would share this simple recipe.
As it turns out, there is a “cure” for shyness. Seth Stevenson’s story “Extroverted Like Me” is a journey into the world of coolness through chemical aids but it quickly turns into a cautionary tale for those willing to overcome their social awkwardness through the use of mood-altering drugs.
Chocolate still seems safe.
In other news, I just got my tickets for U2s’ first concert of the 360º tour in Barcelona!!! *Yay!*. Thanks, Jordi!
Our main iTunes box had flaky RAM -a heck of a problem to debug by itself- so it used to BSOD quite a lot during the past couple of months. One of the most common side effects was that the iTunes Podcast playlist would appear empty every now and then. Luckily this is addressed in the Apple Knowledge Base and the solution amounts to using File|Add Folder to Library to add the {iTunes Music folder}/podcast folder to the library. Then you will have to re-activate your subscriptions by pressing the “Subscribe” button for all your favorite podcasts.
If you use VMware Player or VMware workstation under Linux and you’re an alt-tab fan like me, you might end up with stuck modifier keys, so you can’t use keys like Ctrl, Alt or Shift outside of VMware. Xiao Feng has written a nice script to recover from this annoying condition without having to reboot, and I tought I’d share it with everyone out there:
After getting in closer-than-usual acquaintance with my mail server logs I thought I’d share a brief note I found in the Spamhaus PBL FAQ:
The first thing to know is: THE PBL IS NOT A BLACKLIST.
Oh, and since you’re already there you may want to linger a bit in this warning:
WARNING! Some post-delivery filters use “full Received line traversal” or “deep parsing”, where the filter reads all the IPs in the Received lines. Legitimate users, correctly sending good mail out through their ISP’s smarthost, will have PBL-listed IPs show up in the first (lowest) Received header where their ISP picks it up. Such mail should not be blocked! So, you should tell your filters to stop comparing IPs against PBL at the IP which hands off to your mail server! That last hand-off IP is the one which PBL is designed to check. If you cannot configure your filters that way, then do not use PBL to filter your mail. Instead, you may wish to use sbl-xbl.spamhaus.org, but even that may have unacceptable “false positive” filtering, for example when a an exploited end-user machine sends legitimate mail out through the ISP smarthost, or when the dynamic assignment changes the IP to an uninfected machine. Do not use PBL or XBL if you do not understand the issues of “deep parsing”.
(Emphasis mine)
So if your top-of-the-line multi-thousand-dollar antispam appliance starts blocking all my email just because there’s a dynamic IP address somewhere in the header and there’s no freaking way to turn it off please go ask for a refund. And stop bouncing my messages.
Oh and by the way the default SpamAssassin configuration in Debian assigns a 0.905 score if the last hop is in PBL.
And yes, SpamAssassin does the right thing and checks only the *last* external address — I’ve seen the code:
So once again kudos to Open Source — and Common Sense.

For completeness, here’s a followup to my post about using a Nokia N95 as a bluetooth modem under Linux. This is a working wvdial configuration for use with Telcel in Mexico.
Remember to enter your SIM’s PIN in pin-telcel, and refer to my previous post for complete instructions.
[Dialer telcel]
Phone = *99***1#
Username = telcel
Password = telcel
Stupid Mode = 1
Dial Command = ATDT
Check Def Route = on
Dial Attempts = 3
Modem = /dev/rfcomm0
Baud = 460800
Init2 = ATZ
Init3 = ATQ0 V1 E0 S0=0 &C1 &D2 +FCLASS=0
Init4 = AT+CGDCONT=1,”IP”,”internet.itelcel.com”
ISDN = 0
Modem Type = Analog Modem
To use it, enter
Enjoy!
Did you know that you can use your data-enabled N95 to get a thethered Internet connection from Linux? The access mode and speed will depend on your actual coberture, and as usual YMMV, but I’ve been using this setup for a few months and it works fine.
Now in user mode use KBlueMon to find out the Bluetooth address of your device and write it down.
Then go ahead and initiate an OBEX file transfer to make sure that you can actually link to your phone and to establish a trust relationship. In your phone add the Laptop to your trusted device list, so it won’t nag you whenever you establish a link.
Now edit /etc/bluetooth/rfcomm.conf :
Replace your own device address after “device”.
Now edit /etc/wvdial to add these two entries:
[Dialer vodafone]
Phone = *99***1#
Username = vodafone
Password = vodafone
Stupid Mode = 1
Dial Command = ATDT
Check Def Route = on
Dial Attempts = 3
Modem = /dev/rfcomm0
Baud = 460800
Init2 = ATZ
Init3 = ATQ0 V1 E0 S0=0 &C1 &D2 +FCLASS=0
Init4 = AT+CGDCONT=1,”IP”,”ac.vodafone.es”
ISDN = 0
Modem Type = Analog Modem
You can give them any name you want. I have defined several providers, to avoid confusions and to use the provider at hand. Replace the “XXXX” in Init1 with your SIM’s PIN.
Now to use them restart the Bluetooth subsystem:
And use wvdial to dial out:
You should get an Internet link, complete with an IP, a default route and a couple of DNS servers. If it doesn’t, reboot your phone liberally.
Please note that this might get expensive quite quickly unless you get a data plan from your provider. Go ahead and make their day.
Enjoy!
Say that you need to add a unique index to an existing catalog table, so you decide to add a new column with a consecutive number in it. You may make it an auto_increment column, but that would work only for new inserts. How would you populate the column for the exisiting rows?
If you’re using mySQL you may try this little recipe:
First let’s add the column that we’ll use later as primary key.
Now we declare a counter and use it to populate each row.
Finally, we transform the new column into the primary key.
There you go. A new auto-increment primary key that has been correctly populated for all existing rows.
A few months ago I installed a Firefox 3 beta in my Linux laptop to… well you know, just to fool around. And it crashed spectacularly. I tried again with RC1. No such luck. When 3.0 came around I installed it in several machines –including my wife’s– but it still refused to run in mine.
Today I decided I had enough and ran FF under strace and generally whacked it around hoping to make it work without much luck. I finally decided to apt-get install iceweasel 3.0.1 expecting to have apt-get iron out any possible library conflict but the problem persisted. If anything Firefox crashed even harder because Debian’s Iceweasel does not include Mozilla’s Crash Reporter — it suggests that you install bug-buddy instead. I obligued dutifully and much to my surprise, bug-buddy’s crash report had an extensive and very useful stack trace that revealed libpango as the real culprit.
After zapping libpango I had a working Iceweasel and a few seconds later I was running FF 3.0.1 as well. Now I will check the status of my 23 installed extensions (or at least of those I just can’t live without) and consider Firefox 3.0.1 seriously for my everyday browsing.
If you try to do X forwarding by SSHing to an HP-UX host, you may get the dreaded “Can’t get IP address for X11 DISPLAY.” error. This is more common than you might think, and the reason is that an out-of-the box installation of HP-UX has four or five /etc/nsswitch.conf *examples* for you to install, but not an actual /etc/nsswitch.conf file. I guess this is buried somewhere on the documentation — hey, it might even be a FAQ, but I guess that shipping with a reasonable default wouldn’t hurt.
Well anyway, the following minimal /etc/nsswitch.conf should do for the vast majority of scenarios I can imagine:
Now SSH X forwarding should work and a myriad other disasters waiting to happen will surely be averted.
What’s wrong with this picture?
This construct is invalid in mySQL
According to the manual,
You can use a subquery for assignment within an UPDATE statement because subqueries are legal in UPDATE and DELETE statements as well as in SELECT statements. However, you cannot use the same table (in this case, table t1) for both the subquery’s FROM clause and the update target.
The equivalent multi-table update does the same and works as intended:
Mark Jason Dominus just released SuperPython 0.91, “a Perl source filter for the SuperPython language, allowing SuperPython code to be embedded into Perl programs”.
In terms of language, it goes way beyond python itself to give proper semantics to whitespace. For instance, here is the Hello World program written in SuperPython:
Ain’t it neat? Naturally, the result is
just as would be expected.
If you want to try this program yourself you might be surprised to find out that copy+paste won’t work, but that’s a small price to pay in exchange or the benefits of the richness of syntax and expresiveness of the language, and anyway you may download the source code for hello.spy right here.
Mark is very optimist in contributing the new features of SuperPython back to python itself, and has kindly offered to work closely with the Python community to see this happen.
Congrats Mark, and keep up the good work!
I just got a new ASUS M2V motherboard to replace a braindead server that would lock up on POST about 75% of the time. The new motherboard has a built-in Attansic L1 Gigabit Ethernet Adapter that is supported in Linux >= 2.6.21, but its driver is still missing from the daily Debian netinst CDs.
I tried David Johnson’s pre-compiled driver for AMD64 but it didn’t work right away, so I compiled AtL1Linux_v1.0.41.0 for the stock 2.6.18-4-486 kernel in the official Debian 4.0 netinst CD and tested it. Although it was supposed to work right out of the box I kept getting “invalid module format” messages. So I stripped out the version information with
and it worked immediately. I completed the installation and I will upgrade the server to 2.6.21-2-amd64 over the weekend. So here is a atl1.ko for 2.6.18-4-486 that should work just fine.
By the way, I stripped the version information off David’s atl1.ko but I didn’t get a chance to test it because I was in a hurry. Here it is anyway in case someone finds it useful: atl1.ko for 2.6.18-4-amd64.
Oh, by the way, the M2V has four PCI slots but no built-in VGA adapter, and most PCI-e video cards are so thick that the first slot becomes unusable. Since I bought this motherboard precisely to maximize the number of available PCI slots in the server… well, it just sucks.
I tought this was just a SpreadFirefox stunt, but I just found the most strange User-Agent in an Apache server log
*heh!* I guess it takes another Commodore fan to appreciate this kind of humor.
Magdalena Rodríguez Delgado was born last Tuesday, June 5th 2007, sometime around 18:05 GMT. At birth she was 49cm long and weighed 3.220Kg. Just like her mother, she has a strong, commanding voice and powerful lungs behind it.
In the strange state I’m on right now -neither asleep nor awake, with hardly any sleep on the last three days- I can barely believe that I’m a Dad. And I’m completely, absolutely, positively happy.
After I upgraded a few system libraries Adobe Acrobat stopped working and started to print an endless lethany of “expr: syntax error” messages. A quick google search later I found the fix detailed in at least a couple of places: Find acroread (it’s a shell script, probably in /usr/local/bin or under whichever-directoy-you-specified-during-installation/bin) and apply this patch:
- echo $mfile| sed ’s/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g’
+ echo $mfile| sed ’s/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]*\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g’
return 0
fi
Or just fire up vi(1) and add an asterisk after the second [0-9] block in line 418.
Even tough the problem has been solved, now this is kind of moot. See, I’d rather use acroread than xpdf any day because its navigation is a lot more natural than xpdf’s, and just to be honest xpdf is showing its age and is just plain ugly. However Adobe is starting to piss me off with its inclusion of the Yahoo toolbar in Acrobat Reader and its pitiful insistence to install n upgrades every single freaking time I open a PDF file. So I’ve started to use kpdf instead which feels a bit slower but starts up in a blink, looks a lot cleaner, doesn’t include spyware and displays the PDFs I’ve fed to it with decent antialiasing.
So -just to be clear- in my opinion the best way to fix this problem is to stop using acroread and just use something else. Adobe: thank you for screwing up one of your nicer products, and see you never.
And now for something completely different: This site is now syndicated in Planeta Linux Mexico.
If you haven’t heard about Planets, they are sites that publish aggregated news feeds around certaint themes in the now all-too-familiar reverse chronologic order. Planets are a great way to feel the pulse and hear the buzz of a community without having to maintain individual subscriptions manually. Throught the years I’ve become reliant in several Planet feeds, most notably Planet Perl, Planet Python and Planet Debian.
A few weeks ago Beco introduced me to Planeta Linux -now I’m an avid reader- and kindly offered to talk to Damog and get this blog’s RSS feed into the site.
If you are one of my three regular readers, go visit Planeta Linux, I’m sure you’ll find it as enjoyable as I do. And if you are a Planeta Linux reader, well… Hello!
What’s so special about this number? How is it different from -say- 0×09F911029D74E35BD84156C5635688BF or from 0×09F911029D74E35BD84156C5635688C1? More importantly: can someone copyright a freaking number? Read rudd-o’s Spread this number post and find out why 0×09F911029D74E35BD84156C5635688C0 is so important.
22 queries. 0.215s
$Revision: 1.6 $