File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 14
14
package saml2
15
15
16
16
import (
17
+ "bytes"
17
18
"crypto/tls"
18
19
"crypto/x509"
19
20
"encoding/pem"
@@ -24,6 +25,7 @@ import (
24
25
"github.com/jonboulle/clockwork"
25
26
"github.com/russellhaering/goxmldsig"
26
27
"github.com/stretchr/testify/require"
28
+ rtvalidator "github.com/mattermost/xml-roundtrip-validator"
27
29
)
28
30
29
31
const idpCert = `
@@ -133,11 +135,23 @@ func TestCompressedResponse(t *testing.T) {
133
135
}
134
136
135
137
func TestDecodeColonsInLocalNames (t * testing.T ) {
138
+ // Handling of double colons was improved in Go 1.7 such that this test no longer fails.
139
+ // See: https://go-review.googlesource.com/c/go/+/277892
140
+ if rtvalidator .Validate (bytes .NewReader ([]byte (`<x::Root/>` ))) == nil {
141
+ t .Skip ()
142
+ }
143
+
136
144
_ , _ , err := parseResponse ([]byte (`<x::Root/>` ))
137
145
require .Error (t , err )
138
146
}
139
147
140
148
func TestDecodeDoubleColonInjectionAttackResponse (t * testing.T ) {
149
+ // Handling of double colons was improved in Go 1.7 such that this test no longer fails.
150
+ // See: https://go-review.googlesource.com/c/go/+/277892
151
+ if rtvalidator .Validate (bytes .NewReader ([]byte (`<x::Root/>` ))) == nil {
152
+ t .Skip ()
153
+ }
154
+
141
155
_ , _ , err := parseResponse ([]byte (doubleColonAssertionInjectionAttackResponse ))
142
156
require .Error (t , err )
143
157
}
You can’t perform that action at this time.
0 commit comments