Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sure. Especially in OOP code i'd say it's not uncommon to fill the data into an object and then validate the whole object in one go. You might not check again if "role" is still the same, because you wouldn't expect that the user can have any influence on it.


If you were a developer familiar with Perl you'd hopefully at least test with perl -T

If you had no familiarity with Perl I could see you getting bit by that. After you'd learned enough to be proficient enough to be writing code taking actual user input in a production env. you should really know about that issue since it's discussed in the Perl dev. community often enough. Also by that point you should be at a minimum testing any and all code taking actual user input with taint mode which would point out that problem immediately.

If you read the docs, you wouldn't have that bug: http://perldoc.perl.org/perlsec.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: