Skip to content

AIS marking emits invalid string on Python 3 #319

@gtback

Description

@gtback

This is an example of an invalid XML fragment emitted by the AIS marking binding.

<AIS:AISMarkingStructure
        xmlns:AIS="http://www.us-cert.gov/STIXMarkingStructure#AISConsentMarking-2"
        xmlns:marking="http://data-marking.mitre.org/Marking-1"
        xmlns:example="http://example.com"
        xmlns:xlink="http://www.w3.org/1999/xlink"
        xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:type=b'"AIS:AISMarkingStructure"'>
    <AIS:Is_Proprietary CISA_Proprietary="true">
        <AIS:AISConsent consent="EVERYONE"/>
        <AIS:TLPMarking color="AMBER"/>
    </AIS:Is_Proprietary>
</AIS:AISMarkingStructure>

Note the b'"AIS:AISMarkingStructure"' in the middle. Looks like Unicode strings and byte strings are getting improperly mixed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions