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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

When parameterization fails: SQL injection in Nim using parameterized queries

20 点作者 xx_ns大约 1 个月前

1 comment

jiggawatts大约 1 个月前
That’s… not parameterization the way most people understand it. It’s text templating, which is different and fraught with risk as the OP discovered.<p>For comparison: the Microsoft SQL client code will <i>not</i> substitute an escaped version of the query parameters into the query text! It sends the query with the named placeholders first, and then the parameter values encoded <i>separately</i> so that there’s zero risk of this kind of thing happening.<p>Also, this makes it trivial for the database engine to cache each query independently of the specific query parameter values.
评论 #43564746 未加载
评论 #43562671 未加载