Uploaded image for project: 'Rampart'
  1. Rampart
  2. RAMPART-157

Duplicate namespace declaration in SingedEncryptedElements assertion

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.4
    • rampart-policy
    • None
    • any

    Description

      The serialize method in org.apache.ws.secpolicy.model.SignedEncryptedElements causes duplicate namespace declaration in the assertion. The bug seems to be introduced as a result of the bug fix to Rampart issue 123. The problematic code is:

      // xmlns:sp=".."
      writer.writeNamespace(prefix, namespaceURI);

      if (writerPrefix == null)

      { // xmlns:sp=".." writer.writeNamespace(prefix, namespaceURI); }

      Normally the writer prefix won't be null, however if the SignedEncryptedElements assertion is the first in the policy and no prior declarations of the security policy namespace exist, the writer prefix is null and the namespace is declared twice, resulting in an exception when parsed afterwards.

      Attachments

        1. SignedEncryptedElements.patch
          1 kB
          Stefan Vladov

        Activity

          People

            ruchith Ruchith B. Gunaratne
            chefo Stefan Vladov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified