While this particular example might not be considered severe, other more malicious code could be added, especially DELETE or UPDATE statements that modify tables.
虽然这个特例的后果可能并不太严重,但完全有可能添加更恶意的代码,尤其是会修改表的DELETE或update语句。
See Download for has all the code implemented in this article, together with a simple jQuery-based test script that you can use to perform get, POST, PUT and DELETE requests on the example API.
从下载部分,下载本文中实现的所有代码,以及一个简单的基于jQuery的测试脚本,您可以使用该脚本在示例API上执行GET、POST、PUT和DELETE请求。
Note: you can delete the existing records in the product table that you imported from the old database to test out the code.
注意:可以删除product表中从原数据库导入的现有记录,从而测试此代码。
应用推荐