OpenJPA
  1. OpenJPA
  2. OPENJPA-1886

Query trace may contain sensitive information and should not be logged by default.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2, 2.1.0
    • Fix Version/s: 2.1.0
    • Component/s: logging
    • Labels:
      None

      Description

      This is the same problem as reported by OPENJPA-1678 except it is coming from openjpa.Query.

      To recreate this problem, run org.apache.openjpa.persistence.querycache.TestQueryCache and enable "openjpa.Log","Query=trace".

      375 test TRACE [main] openjpa.Query - Executing query: [SELECT o FROM Entity1 o WHERE o.pk = :pk] with parameters:

      {pk=2}

        Issue Links

          Activity

          Rick Curtis created issue -
          Rick Curtis made changes -
          Field Original Value New Value
          Link This issue is part of OPENJPA-1678 [ OPENJPA-1678 ]
          Rick Curtis made changes -
          Assignee Rick Curtis [ curtisr7 ]
          Hide
          Rick Curtis added a comment -

          Commited the bug fix and a few new test cases.

          I'm not real excited about how I had to fix this problem though... Currently we turn this behavior off/on by setting openjpa.ConnectionFactoryProperties=PrintParameters=true but ideally this would be configured via openjpa.Log=PrintParameters=true... but as I know Mike found out when trying to fix OPENJPA-1678, that isn't a trivial task. If I understand the code correctly, to support PrintParameters on openjpa.Log we would need to modify the LogFactory interface, and potentially break any and all external implementers of that interface.

          This isn't an ideal fix, but it does fix the reported problem.

          Show
          Rick Curtis added a comment - Commited the bug fix and a few new test cases. I'm not real excited about how I had to fix this problem though... Currently we turn this behavior off/on by setting openjpa.ConnectionFactoryProperties=PrintParameters=true but ideally this would be configured via openjpa.Log=PrintParameters=true... but as I know Mike found out when trying to fix OPENJPA-1678 , that isn't a trivial task. If I understand the code correctly, to support PrintParameters on openjpa.Log we would need to modify the LogFactory interface, and potentially break any and all external implementers of that interface. This isn't an ideal fix, but it does fix the reported problem.
          Rick Curtis made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.1.0 [ 12314542 ]
          Resolution Fixed [ 1 ]
          Hide
          Rick Curtis added a comment -

          Closing resolved issues.

          Show
          Rick Curtis added a comment - Closing resolved issues.
          Rick Curtis made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Rick Curtis
              Reporter:
              Rick Curtis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development