GWT:使用查询字符串
我正在使用 iframe、.aspx 文件,当然还有 GWT。
我有一些 .aspx 文件在 Windows 服务器上运行。我通过 GWT 的 iFrame 访问它。问题是我必须将查询从 GWT 发送到 Windows 服务器,即 .aspx 文件。我使用以下方法将查询嵌入到 url 中。
http://localhost:46703/WebForm1.aspx?Select=emp_id&From=emp_table
这种方法的担忧是安全性受到损害。还有其他解决方法吗?
Note: Currently working with GWT 2.4.0
I am working with iframes, .aspx files and of-course GWT.
I have some .aspx files running on windows server. I am accessing it through iFrames from GWT. The problem is i have to send a query from my GWT to windows server i.e., .aspx file. I used the following approach of embedding the query in the url.
http://localhost:46703/WebForm1.aspx?Select=emp_id&From=emp_table
The concern with this approach is that the security has been compromised. Is there any other workaround for this?
Note: Currently working with GWT 2.4.0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
保护 aspx 服务器的安全,以便需要用户的会话,并验证该会话应该有权访问正在检索的数据。
很抱歉回答这么简短,有整本书介绍如何实现这一点。
另外,不要将 SQL 查询本身作为参数传递,而是应该在服务器端进行查找,该查询已预定义以避免 SQL 注入。
Secure the aspx server so that the user's session is required, and validate that the session should have access to the data being retrieved.
Sorry for such a short answer, there are whole books on how to accomplish this.
Also, don't pass the SQL query itself as parameters, instead you should have a lookup on the server side that has the query predefined to avoid SQL injection.