HNHacker News
TopNewBestAskShowJobs

chrismsnz

589 karma · joined May 1, 2010

Security Engineer in NZ
submissionscomments
chrismsnz··on SQL Injection Vulnerability in Ruby on Rails; affects all versions
I will defer to the rails core dev here :)

The linked vuln report gives the impression that regular parameter handling is vulnerable.

chrismsnz··on SQL Injection Vulnerability in Ruby on Rails; affects all versions
That's a bug/exploit in Authlogic, a third party library for rails, not rails.

However, that bug/exploit is based on the rails vuln and was patched in authlogic exactly how the Rails report instructed people to work around it (casting the parameter to a string).

Reading the actual report linked in the OP you'll see that generic and boilerplate code (e.g. the extremely common pattern: "Post.find_by_id(params[:id])") is going to be vulnerable to this bug.

chrismsnz··on SQL Injection Vulnerability in Ruby on Rails; affects all versions
Please provide a source for your claims.

From looking at it, it seems that ANY HTTP parameter (e.g. POST or GET - which are completely user-controlled) can be manipulated if you know how it's going to be used in the code, e.g. an obvious object ID.

EDIT: tenderlove sets it straight below

chrismsnz··on SQL Injection Vulnerability in Ruby on Rails; affects all versions
To continue the metaphor, it seems that in their mission to make the meal taste better for the customer they neglected to clear the poison.

Lets not pretend that Ruby/Rails doesn't make major architectural decisions in favour of ease of use for the user.

e.g. if HTTP params weren't automatically marshalled into non-string data structures this bug wouldn't exist.

chrismsnz··on Go is PHP for the Backend
Interesting - hadn't seen that before. My own attempts at brewing something together with PHP's posix and pcntl libs were feeble.

Thanks for the link.

chrismsnz··on Go is PHP for the Backend
Yeah, same. You really do need supervisord to manage the process, though.

My background processes lean on supervisor's functionality quite a lot. Most of them don't run any longer than 5 mins or so.

chrismsnz··on Google Preps Maps App for Apple iPhones
AFAIK it was Apple that held back features from Google Maps. The previous Maps app was written by them (using Google's data).
chrismsnz··on CyanogenMod 10.0 Release
Yeah, I'm disappointed with that. I bought the phone because it was popular and I was sure it was going to have support. Guess I was wrong.

Always buy a nexus!

chrismsnz··on How Lanyrd moved from AWS to SoftLayer and MySQL to PostgreSQL with no downtime
Check out Varnish's configurable grace period.

It will basically instruct it to continue to serve content that it considers "stale" (up to a point) until it is able to update it.

chrismsnz··on ThinkPad Design: Spirit and Essence
I have noticed some image persistence issues on mine as well. Any idea on how to fix/minimise it?
chrismsnz··on The new Secure Password Hashing API in PHP 5.5
I think the PHP's standard library is as inconsistent as the next guy, but I kind of appreciate there just being a function when just a function is needed.

i.e. Python's standard library provides objects where appropriate, but often they will just put functions directly into modules for simplicity.

chrismsnz··on Monads in Clojure
I've been spending some time to try and pick up Haskell and I just thought I'd mention that I found "Real World Haskell"[0] to be a bit more understandable and accessible to me than "Learn you a Haskell".

Different strokes, obviously, but just thought I'd mention an alternative.

[0]: http://book.realworldhaskell.org/

chrismsnz··on Creepy Spying System Revealed by Wikileaks, Which Then Gets Hit by DDOS Attack
Something that seems easy to verify with a digital signature?
chrismsnz··on NSA Mimics Google, Pisses Off Senate
It's in the article.

"and that’s a particular worry for Oren Falkowitz, one of the developers of the database, who has left the NSA to start Sqrrl, a company that seeks to build a business around Accumulo in much the same way Red Hat built one around the Linux operating system."

chrismsnz··on Dumping PHP For Go
I get the gist of what you're saying but Go's compile speeds are ridiculously fast. Switching into the terminal takes me longer for my projects.
chrismsnz··on PHP: The Right Way
It's fine now until someone hacks their site or poisons their DNS.
chrismsnz··on PHP: The Right Way
Exactly, this is what infuriates me about the arguments and whining against PSR-2.

Spaces, Tabs, OTBS, whatever. It doesn't matter which one was chosen, just that something was chosen. Ask the Pythonista's what PEP8 did for their developer's ecosystem.

Also it's important to note that that PSR-2 was based off already existing coding standards like Zend's and Symfony's.

chrismsnz··on As crops rot, millions go hungry in India
Not sure how that example is indicative of Socialism.

More generally I would say it was interventionist, but very poorly handled. The issue is because they don't know what they're doing, rather than that they are subscribed to a certain style of government.

chrismsnz··on Flask 0.9 codename Campari released today
FYI, the author of Flask was the same person who proposed and published the PEP on the byte str changes.
chrismsnz··on Just open sourced my 10k LOC PHP & MySQL invoicing app
My favourite is probably:

Say you want to add a product to an existing order in the database...

$orderProduct = new OrderProduct(); $order = OrderPeer::retrieveByPK(1);

$order->addOrderProduct($orderProduct);

Now, if ANYWHERE after this point in the code, something calls $order->getOrderProducts() before you call $order->save() (like a validation routine or something) you will lose that new OrderProduct and it will not be persisted.

It's bit me more than once, especially as you start to spread code around that depends on traversing the relationships - can be a very tricky bug to spot.

chrismsnz··on Gondor expands its Django hosting to any Python WSGI app
Not as of yet!
chrismsnz··on Just open sourced my 10k LOC PHP & MySQL invoicing app
If you think that your project is going to grow into a substantial code base, I would NOT recommend Propel.

A lot about their active record implementation violates POLA with various gotchas and code generation gets tedious and unwieldy with models that contain many fields or relations.

chrismsnz··on Gondor expands its Django hosting to any Python WSGI app
Check out webfaction, their virtualenv support is a _little_ wonky but the python environment is per-app so you don't really need it.

I run half a dozen Django apps for less than $10/mo but they support any WSGI system, postgres or MySQL and their platform also handles your mail & DNS.

chrismsnz··on Just open sourced my 10k LOC PHP & MySQL invoicing app
I'm not the OP but almost any PHP project these days has me reaching for Symfony 2[0] or her little brother Silex[1] paired with Doctrine 2[2].

[0]. http://symfony.com/ [1]. http://silex.sensiolabs.org/ [2]. http://www.doctrine-project.org/

chrismsnz··on A Rebase Workflow for Git
I use 'git commit --amend' which does basically the same thing.

Both have to be done before pushing to remote, anyway.

chrismsnz··on Change your Last.fm password
That's what I did when I migrated our application to bcrypt some time ago.

I had some questions about whether using an md5sum as the bcrypt input, with much less keyspace (only hex characters) had any impact on security but nobody could/would answer.

I'm guessing that knowing that the plaintext for the bcrypt hash is always going to be 16 characters of 0-9,a-f might have some impact on crypto analysis but considering the passwords most people use I'm guessing it's only going to be a net win in terms of entropy.

chrismsnz··on Pocket team's tips for aspiring Android developers: It’s not really terrifying.
> Google could have just as easily bargained for the same kind of terms that Apple gets on iOS devices with carriers.

Right, and what about the hundreds of other manufacturers of Android phones?

chrismsnz··on Valve is developing Steam for Linux, says Michael Larabel of Phoronix
It's not just Steam, I had a CS filesystem and could not install Starcraft 2 either.
chrismsnz··on Notch's Specification for the In-Game DCPU-16
RPython, perhaps?
chrismsnz··on How lessons from a tradesman can help out a techie
To a techie, his "tools" are probably his mind and body. Pays to take care of those to stay productive :)
← PreviousPage 3 of 5Next →