如果使用 URL 屏蔽,我们可以在经典 ASP 中使用 Request.QueryString 吗?

发布于 2024-11-30 14:34:42 字数 532 浏览 4 评论 0原文

我正在为我们当地的俱乐部编写一个网站。我已经将所有用 ASP 编写的站点链接到我们的后端 SQL 服务器,并且运行良好。我现在想创建玩家档案。通常我会使用“(a href=playerdetails.asp?ID=1) Player 1 (/a)”,然后在页面的 ASP 部分使用 strsql = "SELECT * FROM PlayersWhere ID=" &请求.querystring(“ID”)。

然而,这就是我的问题开始的地方。为了为俱乐部省钱,我还在我的私人域名上为他们托管了网站。我们已经在那里注册了域名,而不是支付托管费用,我们只是使用屏蔽通过域名注册 URL 转发来重定向流量。因此,URL 不是 www.mydomain.com/club/,而是 www.club.com。

因此,最初的问题...我可以在我们现有的设置中使用 request.querystring 吗?如果没有,有没有办法解决这个问题,因为俱乐部实际上没有后端使用 SQL 的托管站点的预算。

预先感谢,

保罗。

PS < 在链接中替换为 ( 以便正确显示。

I'm writing a website for a local club of ours. I've got all the site written in ASP linked to our backend SQL server and it works lovely. I want to create player profiles now. Normally I would use "(a href=playerdetails.asp?ID=1) Player 1 (/a)" then in the ASP section of the page use strsql = "SELECT * FROM Players Where ID=" & request.querystring("ID").

However, this is where my problems starts. To save money for the club, I am also hosting the site for them on my private domain. We have registered there domain and instead of paying for hosting, we're just redirecting the traffic via the domain registers URL forwarding, using masking. Therefore instead of the URL saying www.mydomain.com/club/ it says www.club.com.

Thus the original question... Can I use request.querystring with the setup we have? If not, is there a way around it as the club doesn't really have the budet for a hosted site with SQL in the backend.

Thanks in advance,

Paul.

PS <'s in the link replaced with ('s to display correctly.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小姐丶请自重 2024-12-07 14:34:42

有几点:

URL 屏蔽使用框架来隐藏实际的 URL。您仍然可以在 URL 中使用查询字符串值,但是您不会看到地址栏中的 URL 发生变化,因为 www.club.com 始终会对 URL 进行屏蔽。

http://en.wikipedia.org/wiki/Domain_Masking

其次,您要开放您的网站SQL注入攻击:

  • 永远不要信任用户输入,
  • 永远不要在SQL状态中使用Request.QueryString或Request.Form而不过滤掉坏字符和关键字。

http://en.wikipedia.org/wiki/SQL_injection

A couple of things:

URL Masking uses frames to hide the actual URL. You can still use query string values in the URL, however you will not see the URL in the address bar change, because it will always be www.club.com do to the URL masking.

http://en.wikipedia.org/wiki/Domain_Masking

Second you are opening up your site to SQL injection attacks:

  • NEVER trust user input
  • NEVER use Request.QueryString or Request.Form in SQL states without filtering out bad characters and keywords.

http://en.wikipedia.org/wiki/SQL_injection

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文