Petals BC SQL

Control characters are not escaped

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.6.2
  • Fix Version/s: 1.6.3
  • Component/s: None
  • Security Level: Public
  • Description:
    Hide

    In a database, it is possible to have text values containing control characters (0x01 to 0x1f except whitespace 0x09, 0x0a, 0x0d) that are forbidden in XML.
    So, these characters are put in the XML response of the JDBC service as is, and so the XML can not be parsed with an error as following:

    lineNumber: 1; columnNumber: 121;  An invalid XML character (Unicode: 0x10) was found in the element content of the document.]
    	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)
    	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:526)
    	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:223)
    	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:189)
    	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)
    	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:125)
    	...
    Show
    In a database, it is possible to have text values containing control characters (0x01 to 0x1f except whitespace 0x09, 0x0a, 0x0d) that are forbidden in XML. So, these characters are put in the XML response of the JDBC service as is, and so the XML can not be parsed with an error as following:
    lineNumber: 1; columnNumber: 121;  An invalid XML character (Unicode: 0x10) was found in the element content of the document.]
    	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)
    	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:526)
    	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:223)
    	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:189)
    	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)
    	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:125)
    	...
  • Environment:
    -

Activity

People

Dates

  • Created:
    Tue, 21 Mar 2017 - 16:28:39 +0100
    Updated:
    Wed, 22 Mar 2017 - 10:49:17 +0100
    Resolved:
    Wed, 22 Mar 2017 - 10:49:16 +0100