Uploaded image for project: 'Syncope'
  1. Syncope
  2. SYNCOPE-416

AttributableSearchDAOImpl / Avoid query construction with string concatenation

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.3, 1.2.0-M1
    • Fix Version/s: 1.1.4, 1.2.0-M1
    • Component/s: core
    • Labels:
      None

      Description

      Is there any reason why in org.apache.syncope.core.persistence.impl.AttributableSearchDAOImpl:419
      the like condition is appended by string concatenation?

      query.append(" LIKE '").append(cond.getExpression()).append("'");

      IMO this could open up a possible SQL injection vulnerability.

      In AttributableSearchDAOImpl:387 a query parameter is used, as I would have expected.

        Attachments

          Activity

            People

            • Assignee:
              ilgrosso Francesco Chicchiriccò
              Reporter:
              wimmelg Guido Wimmel
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: