Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-769

[psp] Escaping search filters?

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.1.0
    • None
    • provisioning
    • None

    Description

      I think I ran across an issue where the PSP is not escaping search filters when trying to query LDAP. What I'm seeing is if you for instance update the description of a group in Grouper (and have the PSP configured to update LDAP with that via the change log) with a value that contains an open parenthesis, such as "test (test", then you get the following exception:

      2012-04-07 11:30:00,146: [DefaultQuartzScheduler_Worker-3] ERROR BaseSpmlProvider.execute(452) - - Target 'ldap' - Search SearchResponse[psos=0,status=failure,error=customError,errorMessages=

      {Unbalanced parenthesis},requestID=2012/04/07-11:30:00.142]
      2012-04-07 11:30:00,147: [DefaultQuartzScheduler_Worker-3] ERROR BaseSpmlProvider.execute(454) - - Target 'ldap' - Search XML:
      <spmlsearch:searchResponse xmlns='urn:oasis:names:tc:SPML:2:0' xmlns:spmlsearch='urn:oasis:names:tc:SPML:2:0:search' status='failure' requestID='2012/04/07-11:30:00.142' error='customError'>
      <errorMessage>Unbalanced parenthesis</errorMessage>
      </spmlsearch:searchResponse>

      2012-04-07 11:30:00,147: [DefaultQuartzScheduler_Worker-3] ERROR BaseSpmlProvider.execute(452) - - Target 'psp' - Search SearchResponse[psos=0,status=failure,error=customError,errorMessages={Unbalanced parenthesis}

      ,requestID=2012/04/07-11:30:00.142]
      2012-04-07 11:30:00,148: [DefaultQuartzScheduler_Worker-3] ERROR BaseSpmlProvider.execute(454) - - Target 'psp' - Search XML:
      <spmlsearch:searchResponse xmlns='urn:oasis:names:tc:SPML:2:0' xmlns:spmlsearch='urn:oasis:names:tc:SPML:2:0:search' status='failure' requestID='2012/04/07-11:30:00.142' error='customError'>
      <errorMessage>Unbalanced parenthesis</errorMessage>
      </spmlsearch:searchResponse>

      2012-04-07 11:30:00,149: [DefaultQuartzScheduler_Worker-3] ERROR Psp.hasAttribute(1890) - - SearchResponse[psos=0,status=failure,error=customError,errorMessages=

      {Unbalanced parenthesis},requestID=2012/04/07-11:30:00.142]
      2012-04-07 11:30:00,149: [DefaultQuartzScheduler_Worker-3] ERROR PspChangeLogConsumer.processUpdate(1045) - - PSP Consumer 'psp' - Change log entry 'ChangeLogEntry[timestamp=2012-04-07 11:29:20.365,sequence=3137063,category=group,actionname=updateGroup,contextId=955cd6157c3a4daa8cb277a416c0150a]' An exception occurred 'edu.internet2.middleware.psp.PspException: SearchResponse[psos=0,status=failure,error=customError,errorMessages={Unbalanced parenthesis}

      ,requestID=2012/04/07-11:30:00.142]'
      2012-04-07 11:30:00,150: [DefaultQuartzScheduler_Worker-3] ERROR PspChangeLogConsumer.processUpdate(1059) - - PSP Consumer 'psp' - Change log entry 'ChangeLogEntry[timestamp=2012-04-07 11:29:20.365,sequence=3137063,category=group,actionname=updateGroup,contextId=955cd6157c3a4daa8cb277a416c0150a]' Update failed
      2012-04-07 11:30:00,151: [DefaultQuartzScheduler_Worker-3] ERROR PspChangeLogConsumer.processChangeLogEntries(455) - - PSP Consumer 'psp' - An error occurred processing sequence number 3137063
      edu.internet2.middleware.psp.PspException: PSP Consumer 'psp' - Change log entry 'ChangeLogEntry[timestamp=2012-04-07 11:29:20.365,sequence=3137063,category=group,actionname=updateGroup,contextId=955cd6157c3a4daa8cb277a416c0150a]' Update failed
      at edu.internet2.middleware.psp.grouper.PspChangeLogConsumer.processUpdate(PspChangeLogConsumer.java:1060)
      at edu.internet2.middleware.psp.grouper.PspChangeLogConsumer.processGroupUpdate(PspChangeLogConsumer.java:638)
      at edu.internet2.middleware.psp.grouper.PspChangeLogConsumer$EventType$5.process(PspChangeLogConsumer.java:118)
      at edu.internet2.middleware.psp.grouper.PspChangeLogConsumer.processChangeLogEntry(PspChangeLogConsumer.java:517)
      at edu.internet2.middleware.psp.grouper.PspChangeLogConsumer.processChangeLogEntries(PspChangeLogConsumer.java:451)
      at edu.internet2.middleware.grouper.changeLog.ChangeLogHelper.processRecords(ChangeLogHelper.java:204)
      at edu.internet2.middleware.grouper.app.loader.GrouperLoaderType$4.runJob(GrouperLoaderType.java:539)
      at edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.runJob(GrouperLoaderJob.java:379)
      at edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.execute(GrouperLoaderJob.java:281)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
      2012-04-07 11:30:00,158: [DefaultQuartzScheduler_Worker-3] ERROR ChangeLogHelper.processRecords(222) - - Error: PSP Consumer 'psp' - An error occurred processing sequence number 3137063, sequenceNumber: 3137063, edu.internet2.middleware.psp.PspException: PSP Consumer 'psp' - Change log entry 'ChangeLogEntry[timestamp=2012-04-07 11:29:20.365,sequence=3137063,category=group,actionname=updateGroup,contextId=955cd6157c3a4daa8cb277a416c0150a]' Update failed
      at edu.internet2.middleware.psp.grouper.PspChangeLogConsumer.processUpdate(PspChangeLogConsumer.java:1060)
      at edu.internet2.middleware.psp.grouper.PspChangeLogConsumer.processGroupUpdate(PspChangeLogConsumer.java:638)
      at edu.internet2.middleware.psp.grouper.PspChangeLogConsumer$EventType$5.process(PspChangeLogConsumer.java:118)
      at edu.internet2.middleware.psp.grouper.PspChangeLogConsumer.processChangeLogEntry(PspChangeLogConsumer.java:517)
      at edu.internet2.middleware.psp.grouper.PspChangeLogConsumer.processChangeLogEntries(PspChangeLogConsumer.java:451)
      at edu.internet2.middleware.grouper.changeLog.ChangeLogHelper.processRecords(ChangeLogHelper.java:204)
      at edu.internet2.middleware.grouper.app.loader.GrouperLoaderType$4.runJob(GrouperLoaderType.java:539)
      at edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.runJob(GrouperLoaderJob.java:379)
      at edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.execute(GrouperLoaderJob.java:281)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)

      Also, the root cause of the error isn't being logged, which may be another issue..

      Attachments

        Activity

          People

            david.langenberg@at.internet2.edu David Langenberg
            shilen.patel@at.internet2.edu Shilen Patel (duke.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Smart Checklist