Checkmarx Improper Resource Access Authorization

强颜欢笑 提交于 2019-12-11 18:00:00

问题


I am using the Checkmarx security tool to scan my code, it is saying that when I execute executeUpdate() commands to the database that is "Improper Resource Access Authorization."

Various Googling with no success.

int rowInserted = preparedStatement.executeUpdate();

回答1:


Add some code that performs access control checks that makes use of words like "admin", "authoriz" or "allowed"

 if (user.equals("admin")){
    int rowInserted = preparedStatement.executeUpdate();
 }


来源:https://stackoverflow.com/questions/57824178/checkmarx-improper-resource-access-authorization

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!