Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-9748

Openshift service: JSonSanitizer should be able to handle valid json objects with escaped quotes

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.3.0.M4
    • Fix Version/s: 3.3.0.M4
    • Component/s: openshift
    • Labels:
      None

      Description

      The JSonSanitzer currently is in place to 'sanitize' invalid json that is being responded by the openshift service. It corrects erroneously quotes json objects with escaped quotes in it:

      ... 
      "aJsonObjectHere": "{ 
         \"aNestedProperty\" : \"withAStringValue\"
      }" 
      ...
      

      *This sanitizer should be able to handle valid and invalid json since openshift could fix their bug after we release our plugins. *

      The current implementation would most likely sanitize string values erroneously, if they have escaped quotes in the value:

      "aStringValueWithA\"Quote"
      

      The above value would get transformed into an invalid value if the json object would be reported in a valid way (aka not quoted and the quotes in it not escaped):

      ... 
      "aJsonObjectHere": { 
         "aNestedProperty" : "withAStringValueWithA\"Quote"
      } 
      

      The above would become:

      ... 
      "aJsonObjectHere": { 
         "aNestedProperty" : "withAStringValueWithA"Quote"
      } 
      

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            adietish Andre Dietisheim added a comment -

            tests added and committed to TRUNK (M4)

            Show
            adietish Andre Dietisheim added a comment - tests added and committed to TRUNK (M4)
            Hide
            sbunciak Stefan Bunciak added a comment -

            Verified with JUnit test

            Show
            sbunciak Stefan Bunciak added a comment - Verified with JUnit test

              People

              • Assignee:
                adietish Andre Dietisheim
                Reporter:
                adietish Andre Dietisheim
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development