-
Notifications
You must be signed in to change notification settings - Fork 827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: sonar smell findings #2407
Conversation
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/185627350 The labels on this github issue will be updated when the story is started. |
server/src/main/java/org/cloudfoundry/identity/uaa/resources/jdbc/JdbcPagingList.java
Fixed
Show fixed
Hide fixed
result = result.substring(0, orderByPos); | ||
private String getDBName(String sql) { | ||
String result = ""; | ||
Matcher dbNameResult = dbName.matcher(sql); |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data
@@ -73,14 +76,14 @@ | |||
this.sql = sql; | |||
this.args = args; | |||
this.mapper = mapper; | |||
this.size = parameterJdbcTemplate.queryForObject(getCountSql(sql), args, Integer.class); | |||
this.size = jdbcTemplate != null ? parameterJdbcTemplate.getJdbcTemplate().queryForObject("select count(*) from " + getDBName(sql), Integer.class) : 0; |
Check failure
Code scanning / CodeQL
Query built from user-controlled sources
https://sonarcloud.io/project/issues?resolved=false&sinceLeakPeriod=true&types=BUG&id=cloudfoundry-identity-parent