创建具有不可知名称的表更安全吗? [英] Is it more secure to create tables with unguessable name?

查看:48
本文介绍了创建具有不可知名称的表更安全吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果数据库中的表名是不可取的,是否会使它更安全?

例如而不是命名用户USER我们将其命名为USER-x0001

这种方法是否使数据库更安全再次SQL注入?

If the tables name in the database are unguessable does it make it more secure?
for example instead of naming the user "USER" we name it "USER-x0001"
does this approach make the database more secure again SQL injection?

推荐答案

不,不显着。可以使用SELECT返回数据库中的所有表名。

为了避免SQL注入,请使用参数化查询而不是字符串连接。
No, not significantly. It's possible to use SELECT to return all the table names in a DB.
To avoid SQL Injection, use parameterized queries instead of string concatenation.


这篇关于创建具有不可知名称的表更安全吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆