问题
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