Skip to content

Commit 026c521

Browse files
committed
撤销PR315的变更
1 parent 7806505 commit 026c521

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

config/config_xml.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package config
22

33
import (
4-
"bytes"
54
"encoding/xml"
65
)
76

@@ -13,10 +12,7 @@ import (
1312
// Security: This function uses xml.Decoder with strict settings to prevent
1413
// XXE (XML External Entity) attacks.
1514
func UnmarshalXML(content []byte, v interface{}) error {
16-
decoder := xml.NewDecoder(bytes.NewReader(content))
17-
// Note: Go's xml package doesn't process external entities by default
18-
// This explicit usage of Decoder provides clarity and future-proofing
19-
return decoder.Decode(v)
15+
return xml.Unmarshal(content, v)
2016
}
2117

2218
// MarshalXML returns the XML encoding of v.

0 commit comments

Comments
 (0)