mirror of
https://github.com/golang/go
synced 2024-11-24 13:10:11 -07:00
encoding/xml: reject processing instructions with reserved names
This is required by the spec. Fixes: #68499
This commit is contained in:
parent
239666cd73
commit
1adf826302
@ -610,6 +610,11 @@ func (d *Decoder) rawToken() (Token, error) {
|
||||
}
|
||||
return nil, d.err
|
||||
}
|
||||
if len(target) >= 3 && target[0:3] != xmlPrefix &&
|
||||
(target[0] | 0x20) == 'x' && (target[1] | 0x20) == 'm' && (target[2] | 0x20) == 'l' {
|
||||
d.err = d.syntaxError("Processing instruction name is reserved")
|
||||
return nil, d.err
|
||||
}
|
||||
d.space()
|
||||
d.buf.Reset()
|
||||
var b0 byte
|
||||
|
Loading…
Reference in New Issue
Block a user