我有两个用户创建并通过Python应用程序连接到数据库,在sqlite3.connect()中使用用户输入变量时是否存在安全风险?
dbname = raw_input("Please enter the game name you wish to connect to, or the name of a new game: ")
db = sqlite3.connect(dbname)
我很好奇:有没有一种输入一个潜在恶意用户可以用它来攻击数据库(提供我有其他处理程序中没有其他漏洞),或者攻击运行python的底层系统? (据我所知,用户可以继续一遍又一遍运行程序来创建数据库无限多,但我想不出比配额任何其他解决方案可为的)。
在此先感谢!
特拉维斯
所有输入,直到证明不是这样,(1)的恶意,(2)愿意打破你的代码,(3)完全有能力这样做。 (也就是说,这看起来不像典型的安全漏洞。) – delnan