Archives December 2013

Django CSRF explicitly doesn't trust HTTP when submitting to HTTPS

I managed to introduce a wonderful little bug in the Django blog site here. I wanted all contributors (those making comments and myself) to use HTTPS, but I didn't want to rewrite the templates for the Zinnia blog entries, so I just naively redirected the comments form to the HTTPS site. CSRF protection in Django explicitly does not allow HTTP-to-HTTPS posts (which is a good thing, in general, as it prevents someone rewriting the post on the fly). Oops. For now I've made the comments form post to the same protocol you're using to browse. It's ...

Continue reading

os.write() can hang, apparently

Wound up spending the whole afternoon tracking down an "only happens in production" bug where a sub-process would just hang, but only when big chunks of data were involved. Seems that os.write() was trying to write more than the target pipe could handle, so was winding up blocking. To tired to actually confirm that tonight, but if it winds up being confirmed, I'm going to have to go back and look at every case where I've used os.write(). I was under the assumption it would return immediately with the number of bytes written before blocking, something ...

Continue reading

Nexus 5 Phone Contacts WTF

I needed to phone my mother at one point this weekend.

Pulled up the Nexus phone dialer for one of the first times (I don't actually use my phone as a phone all that much). Said my mother's (full) name, saw a brief flash of her details, and they were promptly replaced with a bunch of we results for her name (lawyers in the UK and the like). Of course that's what I was looking for when I explicitly opened the contacts app and searched for someone in my contact list by name... of course.

Same thing ...

Continue reading

Daily archives

Previous month

November 2013

Next month

January 2014

Archives