TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Exploiting 'INSERT INTO' SQL Injections Ninja Style

46 点作者 gipsies超过 13 年前

7 条评论

JoeCortopassi超过 13 年前
The fact that this article got any up votes, let alone 31, is a testament to how many non-programmers read this board. Like InclinedPlane said, Sanitizing database input is database 101. You can't even call yourself a hobbyist programmer until you understand that.<p>For non-technical people: If someone is building you a website, put a single backslash(and only that) in any text fields on your site. If it breaks when you submit, chances are good there is potential for SQL-injection. This is not a 100% check that will catch everything, heck it's not even a 70% check. But a poor programmer that doesn't know anything about SQL-injection will likely build code that fails this test.
评论 #3171455 未加载
评论 #3171173 未加载
评论 #3170904 未加载
评论 #3170778 未加载
veloper超过 13 年前
This is not exploiting INSERT INTO; it's exploiting horrible developers.<p>Rule #1: Never trust the user.
InclinedPlane超过 13 年前
This is sort of interesting, but I'm not sure how it applies to non-black hats. If you are responsible for this code just switch it all to mysqli and be done with it.
评论 #3170306 未加载
评论 #3171456 未加载
brendoncrawford超过 13 年前
In 2011, one should never need to resort to building SQL with string concatenation in web applications.<p>If you are on Python, consider using SQLAlchemy or OurSQL. If you are on PHP, consider using Doctrine, Propel, or PDO.
rick888超过 13 年前
I thought they were phasing these functions out (mysql)? I've been using PDO for the last couple of years.
评论 #3170446 未加载
devmach超过 13 年前
is it works also with prepared statements ? or only with really lame code ?
评论 #3170450 未加载
noduerme超过 13 年前
Escape your strings. Ninja problem solved.