@ttsc/darwin-arm64 0.10.0 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/go/VERSION +2 -2
- package/bin/go/bin/go +0 -0
- package/bin/go/bin/gofmt +0 -0
- package/bin/go/pkg/tool/darwin_arm64/asm +0 -0
- package/bin/go/pkg/tool/darwin_arm64/cgo +0 -0
- package/bin/go/pkg/tool/darwin_arm64/compile +0 -0
- package/bin/go/pkg/tool/darwin_arm64/cover +0 -0
- package/bin/go/pkg/tool/darwin_arm64/fix +0 -0
- package/bin/go/pkg/tool/darwin_arm64/link +0 -0
- package/bin/go/pkg/tool/darwin_arm64/preprofile +0 -0
- package/bin/go/pkg/tool/darwin_arm64/vet +0 -0
- package/bin/go/src/archive/tar/format.go +6 -0
- package/bin/go/src/archive/tar/reader.go +24 -4
- package/bin/go/src/builtin/builtin.go +13 -4
- package/bin/go/src/crypto/fips140/fips140.go +6 -0
- package/bin/go/src/crypto/internal/fips140/drbg/entropy_fips140.go +97 -0
- package/bin/go/src/crypto/internal/fips140/drbg/entropy_wasm.go +11 -0
- package/bin/go/src/crypto/internal/fips140/drbg/rand.go +1 -75
- package/bin/go/src/crypto/tls/conn.go +7 -3
- package/bin/go/src/crypto/tls/handshake_client_tls13.go +2 -2
- package/bin/go/src/crypto/tls/handshake_server_tls13.go +2 -2
- package/bin/go/src/crypto/tls/key_schedule.go +24 -3
- package/bin/go/src/crypto/x509/constraints.go +33 -33
- package/bin/go/src/crypto/x509/verify.go +28 -13
- package/bin/go/src/go/types/builtins.go +2 -2
- package/bin/go/src/go/types/signature.go +3 -0
- package/bin/go/src/go/types/under.go +3 -3
- package/bin/go/src/go.mod +1 -1
- package/bin/go/src/go.sum +2 -2
- package/bin/go/src/html/template/attr_string.go +3 -2
- package/bin/go/src/html/template/context.go +21 -1
- package/bin/go/src/html/template/element_string.go +3 -2
- package/bin/go/src/html/template/escape.go +16 -2
- package/bin/go/src/html/template/js.go +1 -0
- package/bin/go/src/html/template/state_string.go +5 -3
- package/bin/go/src/html/template/transition.go +43 -6
- package/bin/go/src/internal/buildcfg/zbootstrap.go +1 -1
- package/bin/go/src/internal/godebugs/table.go +1 -0
- package/bin/go/src/internal/poll/fd_windows.go +64 -38
- package/bin/go/src/internal/poll/fstatat_unix.go +22 -0
- package/bin/go/src/internal/poll/sendfile_windows.go +3 -1
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_386.go +1 -0
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_amd64.go +1 -0
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_arm.go +1 -0
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_arm64.go +1 -0
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_loong64.go +1 -0
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_mips64x.go +1 -0
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_mipsx.go +1 -0
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_ppc64x.go +1 -0
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_riscv64.go +1 -0
- package/bin/go/src/internal/runtime/syscall/linux/defs_linux_s390x.go +1 -0
- package/bin/go/src/internal/runtime/syscall/linux/syscall_linux.go +14 -0
- package/bin/go/src/internal/syscall/unix/at.go +0 -17
- package/bin/go/src/internal/syscall/unix/at_sysnum_linux.go +2 -1
- package/bin/go/src/internal/syscall/unix/fchmodat_linux.go +51 -0
- package/bin/go/src/internal/syscall/unix/fchmodat_other.go +29 -0
- package/bin/go/src/internal/syscall/windows/at_windows.go +20 -3
- package/bin/go/src/internal/syscall/windows/registry/key.go +10 -2
- package/bin/go/src/internal/syscall/windows/registry/value.go +5 -1
- package/bin/go/src/internal/syscall/windows/syscall_windows.go +4 -0
- package/bin/go/src/internal/syscall/windows/types_windows.go +82 -0
- package/bin/go/src/internal/syscall/windows/zsyscall_windows.go +27 -0
- package/bin/go/src/net/cgo_unix.go +4 -1
- package/bin/go/src/net/http/doc.go +0 -1
- package/bin/go/src/net/http/h2_bundle.go +3 -3
- package/bin/go/src/net/http/httputil/reverseproxy.go +14 -0
- package/bin/go/src/net/lookup_windows.go +16 -3
- package/bin/go/src/net/mail/message.go +20 -9
- package/bin/go/src/net/sendfile.go +2 -0
- package/bin/go/src/net/sendfile_stub.go +2 -0
- package/bin/go/src/net/sendfile_windows.go +3 -0
- package/bin/go/src/net/url/url.go +22 -16
- package/bin/go/src/os/dir_darwin.go +2 -2
- package/bin/go/src/os/dir_unix.go +2 -2
- package/bin/go/src/os/file.go +0 -3
- package/bin/go/src/os/file_unix.go +9 -5
- package/bin/go/src/os/removeall_at.go +6 -2
- package/bin/go/src/os/removeall_unix.go +0 -8
- package/bin/go/src/os/removeall_windows.go +0 -4
- package/bin/go/src/os/root_unix.go +1 -0
- package/bin/go/src/os/stat.go +3 -0
- package/bin/go/src/os/statat.go +24 -0
- package/bin/go/src/os/statat_other.go +12 -0
- package/bin/go/src/os/statat_unix.go +20 -0
- package/bin/go/src/reflect/value.go +3 -2
- package/bin/go/src/runtime/defs_linux_386.go +4 -3
- package/bin/go/src/runtime/defs_linux_arm.go +4 -3
- package/bin/go/src/runtime/defs_linux_mips64x.go +1 -1
- package/bin/go/src/runtime/defs_linux_mipsx.go +5 -4
- package/bin/go/src/runtime/malloc.go +1 -53
- package/bin/go/src/runtime/mem.go +104 -9
- package/bin/go/src/runtime/metrics/doc.go +5 -0
- package/bin/go/src/runtime/os_linux.go +62 -0
- package/bin/go/src/runtime/os_linux32.go +14 -24
- package/bin/go/src/runtime/os_linux64.go +2 -0
- package/bin/go/src/runtime/print.go +16 -4
- package/bin/go/src/runtime/race/README +9 -9
- package/bin/go/src/runtime/race/internal/amd64v1/race_darwin.patch +63 -0
- package/bin/go/src/runtime/race/internal/amd64v1/race_darwin.syso +0 -0
- package/bin/go/src/runtime/race/internal/amd64v1/race_freebsd.patch +63 -0
- package/bin/go/src/runtime/race/internal/amd64v1/race_freebsd.syso +0 -0
- package/bin/go/src/runtime/race/internal/amd64v1/race_linux.patch +63 -0
- package/bin/go/src/runtime/race/internal/amd64v1/race_linux.syso +0 -0
- package/bin/go/src/runtime/race/internal/amd64v1/race_windows.patch +63 -0
- package/bin/go/src/runtime/race/internal/amd64v1/race_windows.syso +0 -0
- package/bin/go/src/runtime/race/internal/amd64v3/race_linux.patch +63 -0
- package/bin/go/src/runtime/race/internal/amd64v3/race_linux.syso +0 -0
- package/bin/go/src/runtime/race/race_darwin_arm64.patch +63 -0
- package/bin/go/src/runtime/race/race_darwin_arm64.syso +0 -0
- package/bin/go/src/runtime/race/race_linux_arm64.patch +63 -0
- package/bin/go/src/runtime/race/race_linux_arm64.syso +0 -0
- package/bin/go/src/runtime/race/race_linux_loong64.patch +63 -0
- package/bin/go/src/runtime/race/race_linux_loong64.syso +0 -0
- package/bin/go/src/runtime/race/race_linux_s390x.patch +63 -0
- package/bin/go/src/runtime/race/race_linux_s390x.syso +0 -0
- package/bin/go/src/syscall/syscall_windows.go +5 -1
- package/bin/go/src/vendor/modules.txt +1 -1
- package/bin/ttsc +0 -0
- package/package.json +1 -1
|
@@ -253,6 +253,10 @@ type rfc2821Mailbox struct {
|
|
|
253
253
|
local, domain string
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
+
func (s rfc2821Mailbox) String() string {
|
|
257
|
+
return fmt.Sprintf("%s@%s", s.local, s.domain)
|
|
258
|
+
}
|
|
259
|
+
|
|
256
260
|
// parseRFC2821Mailbox parses an email address into local and domain parts,
|
|
257
261
|
// based on the ABNF for a “Mailbox” from RFC 2821. According to RFC 5280,
|
|
258
262
|
// Section 4.2.1.6 that's correct for an rfc822Name from a certificate: “The
|
|
@@ -716,6 +720,8 @@ func alreadyInChain(candidate *Certificate, chain []*Certificate) bool {
|
|
|
716
720
|
// for failed checks due to different intermediates having the same Subject.
|
|
717
721
|
const maxChainSignatureChecks = 100
|
|
718
722
|
|
|
723
|
+
var errSignatureLimit = errors.New("x509: signature check attempts limit reached while verifying certificate chain")
|
|
724
|
+
|
|
719
725
|
func (c *Certificate) buildChains(currentChain []*Certificate, sigChecks *int, opts *VerifyOptions) (chains [][]*Certificate, err error) {
|
|
720
726
|
var (
|
|
721
727
|
hintErr error
|
|
@@ -723,16 +729,16 @@ func (c *Certificate) buildChains(currentChain []*Certificate, sigChecks *int, o
|
|
|
723
729
|
)
|
|
724
730
|
|
|
725
731
|
considerCandidate := func(certType int, candidate potentialParent) {
|
|
726
|
-
if candidate.cert.PublicKey == nil || alreadyInChain(candidate.cert, currentChain) {
|
|
727
|
-
return
|
|
728
|
-
}
|
|
729
|
-
|
|
730
732
|
if sigChecks == nil {
|
|
731
733
|
sigChecks = new(int)
|
|
732
734
|
}
|
|
733
735
|
*sigChecks++
|
|
734
736
|
if *sigChecks > maxChainSignatureChecks {
|
|
735
|
-
err =
|
|
737
|
+
err = errSignatureLimit
|
|
738
|
+
return
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
if candidate.cert.PublicKey == nil || alreadyInChain(candidate.cert, currentChain) {
|
|
736
742
|
return
|
|
737
743
|
}
|
|
738
744
|
|
|
@@ -773,11 +779,20 @@ func (c *Certificate) buildChains(currentChain []*Certificate, sigChecks *int, o
|
|
|
773
779
|
}
|
|
774
780
|
}
|
|
775
781
|
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
782
|
+
candidateLoop:
|
|
783
|
+
for _, parents := range []struct {
|
|
784
|
+
certType int
|
|
785
|
+
potentials []potentialParent
|
|
786
|
+
}{
|
|
787
|
+
{rootCertificate, opts.Roots.findPotentialParents(c)},
|
|
788
|
+
{intermediateCertificate, opts.Intermediates.findPotentialParents(c)},
|
|
789
|
+
} {
|
|
790
|
+
for _, parent := range parents.potentials {
|
|
791
|
+
considerCandidate(parents.certType, parent)
|
|
792
|
+
if err == errSignatureLimit {
|
|
793
|
+
break candidateLoop
|
|
794
|
+
}
|
|
795
|
+
}
|
|
781
796
|
}
|
|
782
797
|
|
|
783
798
|
if len(chains) > 0 {
|
|
@@ -1280,12 +1295,12 @@ func policiesValid(chain []*Certificate, opts VerifyOptions) bool {
|
|
|
1280
1295
|
} else {
|
|
1281
1296
|
// 6.1.4 (b) (3) (i) -- as updated by RFC 9618
|
|
1282
1297
|
pg.deleteLeaf(mapping.IssuerDomainPolicy)
|
|
1283
|
-
|
|
1284
|
-
// 6.1.4 (b) (3) (ii) -- as updated by RFC 9618
|
|
1285
|
-
pg.prune()
|
|
1286
1298
|
}
|
|
1287
1299
|
}
|
|
1288
1300
|
|
|
1301
|
+
// 6.1.4 (b) (3) (ii) -- as updated by RFC 9618
|
|
1302
|
+
pg.prune()
|
|
1303
|
+
|
|
1289
1304
|
for issuerStr, subjectPolicies := range mappings {
|
|
1290
1305
|
// 6.1.4 (b) (1) -- as updated by RFC 9618
|
|
1291
1306
|
if matching := pg.leafWithPolicy(OID{der: []byte(issuerStr)}); matching != nil {
|
|
@@ -115,7 +115,7 @@ func (check *Checker) builtin(x *operand, call *ast.CallExpr, id builtinId) (_ b
|
|
|
115
115
|
for _, u := range typeset(y.typ) {
|
|
116
116
|
if s, _ := u.(*Slice); s != nil && Identical(s.elem, universeByte) {
|
|
117
117
|
// typeset ⊇ {[]byte}
|
|
118
|
-
} else if isString(u) {
|
|
118
|
+
} else if u != nil && isString(u) {
|
|
119
119
|
// typeset ⊇ {string}
|
|
120
120
|
hasString = true
|
|
121
121
|
} else {
|
|
@@ -378,7 +378,7 @@ func (check *Checker) builtin(x *operand, call *ast.CallExpr, id builtinId) (_ b
|
|
|
378
378
|
for _, u := range typeset(y.typ) {
|
|
379
379
|
if s, _ := u.(*Slice); s != nil && Identical(s.elem, universeByte) {
|
|
380
380
|
// typeset ⊇ {[]byte}
|
|
381
|
-
} else if isString(u) {
|
|
381
|
+
} else if u != nil && isString(u) {
|
|
382
382
|
// typeset ⊇ {string}
|
|
383
383
|
} else {
|
|
384
384
|
special = false
|
|
@@ -74,6 +74,9 @@ func NewSignatureType(recv *Var, recvTypeParams, typeParams []*TypeParam, params
|
|
|
74
74
|
last := params.At(n - 1).typ
|
|
75
75
|
var S *Slice
|
|
76
76
|
for t := range typeset(last) {
|
|
77
|
+
if t == nil {
|
|
78
|
+
break
|
|
79
|
+
}
|
|
77
80
|
var s *Slice
|
|
78
81
|
if isString(t) {
|
|
79
82
|
s = NewSlice(universeByte)
|
|
@@ -29,12 +29,12 @@ func all(t Type, f func(t, u Type) bool) bool {
|
|
|
29
29
|
// typeset is an iterator over the (type/underlying type) pairs of the
|
|
30
30
|
// specific type terms of the type set implied by t.
|
|
31
31
|
// If t is a type parameter, the implied type set is the type set of t's constraint.
|
|
32
|
-
// In
|
|
32
|
+
// In this case, if there are no specific terms, the iterator produces (nil, nil).
|
|
33
33
|
// If t is not a type parameter, the implied type set consists of just t.
|
|
34
|
-
// In any case, typeset is guaranteed to
|
|
34
|
+
// In any case, typeset is guaranteed to produce at least one set of results.
|
|
35
35
|
func typeset(t Type) iter.Seq2[Type, Type] {
|
|
36
36
|
return func(yield func(t, u Type) bool) {
|
|
37
|
-
|
|
37
|
+
all(t, yield)
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
package/bin/go/src/go.mod
CHANGED
package/bin/go/src/go.sum
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
golang.org/x/crypto v0.46.1-0.20251210140736-7dacc380ba00 h1:JgcPM1rzpSOZS8y69FQvnY0xN0ciHlpQqwTXJcuZIA4=
|
|
2
2
|
golang.org/x/crypto v0.46.1-0.20251210140736-7dacc380ba00/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
|
|
3
|
-
golang.org/x/net v0.47.1-0.
|
|
4
|
-
golang.org/x/net v0.47.1-0.
|
|
3
|
+
golang.org/x/net v0.47.1-0.20260417193450-705de46f8788 h1:fVWwoa/P68Bsajqy2FO4dha7TRBfgf09o932L4USeXI=
|
|
4
|
+
golang.org/x/net v0.47.1-0.20260417193450-705de46f8788/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
|
|
5
5
|
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
|
|
6
6
|
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
|
7
7
|
golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU=
|
|
@@ -14,11 +14,12 @@ func _() {
|
|
|
14
14
|
_ = x[attrStyle-3]
|
|
15
15
|
_ = x[attrURL-4]
|
|
16
16
|
_ = x[attrSrcset-5]
|
|
17
|
+
_ = x[attrMetaContent-6]
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
const _attr_name = "
|
|
20
|
+
const _attr_name = "attrNoneattrScriptattrScriptTypeattrStyleattrURLattrSrcsetattrMetaContent"
|
|
20
21
|
|
|
21
|
-
var _attr_index = [...]uint8{0, 8, 18, 32, 41, 48, 58}
|
|
22
|
+
var _attr_index = [...]uint8{0, 8, 18, 32, 41, 48, 58, 73}
|
|
22
23
|
|
|
23
24
|
func (i attr) String() string {
|
|
24
25
|
if i >= attr(len(_attr_index)-1) {
|
|
@@ -6,6 +6,7 @@ package template
|
|
|
6
6
|
|
|
7
7
|
import (
|
|
8
8
|
"fmt"
|
|
9
|
+
"slices"
|
|
9
10
|
"text/template/parse"
|
|
10
11
|
)
|
|
11
12
|
|
|
@@ -37,7 +38,7 @@ func (c context) String() string {
|
|
|
37
38
|
if c.err != nil {
|
|
38
39
|
err = c.err
|
|
39
40
|
}
|
|
40
|
-
return fmt.Sprintf("{%v %v %v %v %v %v %v}", c.state, c.delim, c.urlPart, c.jsCtx, c.attr, c.element, err)
|
|
41
|
+
return fmt.Sprintf("{%v %v %v %v %v %v %v %v}", c.state, c.delim, c.urlPart, c.jsCtx, c.jsBraceDepth, c.attr, c.element, err)
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
// eq reports whether two contexts are equal.
|
|
@@ -46,6 +47,7 @@ func (c context) eq(d context) bool {
|
|
|
46
47
|
c.delim == d.delim &&
|
|
47
48
|
c.urlPart == d.urlPart &&
|
|
48
49
|
c.jsCtx == d.jsCtx &&
|
|
50
|
+
slices.Equal(c.jsBraceDepth, d.jsBraceDepth) &&
|
|
49
51
|
c.attr == d.attr &&
|
|
50
52
|
c.element == d.element &&
|
|
51
53
|
c.err == d.err
|
|
@@ -68,6 +70,9 @@ func (c context) mangle(templateName string) string {
|
|
|
68
70
|
if c.jsCtx != jsCtxRegexp {
|
|
69
71
|
s += "_" + c.jsCtx.String()
|
|
70
72
|
}
|
|
73
|
+
if c.jsBraceDepth != nil {
|
|
74
|
+
s += fmt.Sprintf("_jsBraceDepth(%v)", c.jsBraceDepth)
|
|
75
|
+
}
|
|
71
76
|
if c.attr != attrNone {
|
|
72
77
|
s += "_" + c.attr.String()
|
|
73
78
|
}
|
|
@@ -77,6 +82,13 @@ func (c context) mangle(templateName string) string {
|
|
|
77
82
|
return s
|
|
78
83
|
}
|
|
79
84
|
|
|
85
|
+
// clone returns a copy of c with the same field values.
|
|
86
|
+
func (c context) clone() context {
|
|
87
|
+
clone := c
|
|
88
|
+
clone.jsBraceDepth = slices.Clone(c.jsBraceDepth)
|
|
89
|
+
return clone
|
|
90
|
+
}
|
|
91
|
+
|
|
80
92
|
// state describes a high-level HTML parser state.
|
|
81
93
|
//
|
|
82
94
|
// It bounds the top of the element stack, and by extension the HTML insertion
|
|
@@ -156,6 +168,10 @@ const (
|
|
|
156
168
|
// stateError is an infectious error state outside any valid
|
|
157
169
|
// HTML/CSS/JS construct.
|
|
158
170
|
stateError
|
|
171
|
+
// stateMetaContent occurs inside a HTML meta element content attribute.
|
|
172
|
+
stateMetaContent
|
|
173
|
+
// stateMetaContentURL occurs inside a "url=" tag in a HTML meta element content attribute.
|
|
174
|
+
stateMetaContentURL
|
|
159
175
|
// stateDead marks unreachable code after a {{break}} or {{continue}}.
|
|
160
176
|
stateDead
|
|
161
177
|
)
|
|
@@ -267,6 +283,8 @@ const (
|
|
|
267
283
|
elementTextarea
|
|
268
284
|
// elementTitle corresponds to the RCDATA <title> element.
|
|
269
285
|
elementTitle
|
|
286
|
+
// elementMeta corresponds to the HTML <meta> element.
|
|
287
|
+
elementMeta
|
|
270
288
|
)
|
|
271
289
|
|
|
272
290
|
//go:generate stringer -type attr
|
|
@@ -288,4 +306,6 @@ const (
|
|
|
288
306
|
attrURL
|
|
289
307
|
// attrSrcset corresponds to a srcset attribute.
|
|
290
308
|
attrSrcset
|
|
309
|
+
// attrMetaContent corresponds to the content attribute in meta HTML element.
|
|
310
|
+
attrMetaContent
|
|
291
311
|
)
|
|
@@ -13,11 +13,12 @@ func _() {
|
|
|
13
13
|
_ = x[elementStyle-2]
|
|
14
14
|
_ = x[elementTextarea-3]
|
|
15
15
|
_ = x[elementTitle-4]
|
|
16
|
+
_ = x[elementMeta-5]
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
const _element_name = "
|
|
19
|
+
const _element_name = "elementNoneelementScriptelementStyleelementTextareaelementTitleelementMeta"
|
|
19
20
|
|
|
20
|
-
var _element_index = [...]uint8{0, 11, 24, 36, 51, 63}
|
|
21
|
+
var _element_index = [...]uint8{0, 11, 24, 36, 51, 63, 74}
|
|
21
22
|
|
|
22
23
|
func (i element) String() string {
|
|
23
24
|
if i >= element(len(_element_index)-1) {
|
|
@@ -166,6 +166,8 @@ func (e *escaper) escape(c context, n parse.Node) context {
|
|
|
166
166
|
|
|
167
167
|
var debugAllowActionJSTmpl = godebug.New("jstmpllitinterp")
|
|
168
168
|
|
|
169
|
+
var htmlmetacontenturlescape = godebug.New("htmlmetacontenturlescape")
|
|
170
|
+
|
|
169
171
|
// escapeAction escapes an action template node.
|
|
170
172
|
func (e *escaper) escapeAction(c context, n *parse.ActionNode) context {
|
|
171
173
|
if len(n.Pipe.Decl) != 0 {
|
|
@@ -223,6 +225,18 @@ func (e *escaper) escapeAction(c context, n *parse.ActionNode) context {
|
|
|
223
225
|
default:
|
|
224
226
|
panic(c.urlPart.String())
|
|
225
227
|
}
|
|
228
|
+
case stateMetaContent:
|
|
229
|
+
// Handled below in delim check.
|
|
230
|
+
case stateMetaContentURL:
|
|
231
|
+
if htmlmetacontenturlescape.Value() != "0" {
|
|
232
|
+
s = append(s, "_html_template_urlfilter")
|
|
233
|
+
} else {
|
|
234
|
+
// We don't have a great place to increment this, since it's hard to
|
|
235
|
+
// know if we actually escape any urls in _html_template_urlfilter,
|
|
236
|
+
// since it has no information about what context it is being
|
|
237
|
+
// executed in etc. This is probably the best we can do.
|
|
238
|
+
htmlmetacontenturlescape.IncNonDefault()
|
|
239
|
+
}
|
|
226
240
|
case stateJS:
|
|
227
241
|
s = append(s, "_html_template_jsvalescaper")
|
|
228
242
|
// A slash after a value starts a div operator.
|
|
@@ -509,7 +523,7 @@ func (e *escaper) escapeBranch(c context, n *parse.BranchNode, nodeName string)
|
|
|
509
523
|
if nodeName == "range" {
|
|
510
524
|
e.rangeContext = &rangeContext{outer: e.rangeContext}
|
|
511
525
|
}
|
|
512
|
-
c0 := e.escapeList(c, n.List)
|
|
526
|
+
c0 := e.escapeList(c.clone(), n.List)
|
|
513
527
|
if nodeName == "range" {
|
|
514
528
|
if c0.state != stateError {
|
|
515
529
|
c0 = joinRange(c0, e.rangeContext)
|
|
@@ -540,7 +554,7 @@ func (e *escaper) escapeBranch(c context, n *parse.BranchNode, nodeName string)
|
|
|
540
554
|
return c0
|
|
541
555
|
}
|
|
542
556
|
}
|
|
543
|
-
c1 := e.escapeList(c, n.ElseList)
|
|
557
|
+
c1 := e.escapeList(c.clone(), n.ElseList)
|
|
544
558
|
return join(c0, c1, n, nodeName)
|
|
545
559
|
}
|
|
546
560
|
|
|
@@ -36,12 +36,14 @@ func _() {
|
|
|
36
36
|
_ = x[stateCSSBlockCmt-25]
|
|
37
37
|
_ = x[stateCSSLineCmt-26]
|
|
38
38
|
_ = x[stateError-27]
|
|
39
|
-
_ = x[
|
|
39
|
+
_ = x[stateMetaContent-28]
|
|
40
|
+
_ = x[stateMetaContentURL-29]
|
|
41
|
+
_ = x[stateDead-30]
|
|
40
42
|
}
|
|
41
43
|
|
|
42
|
-
const _state_name = "
|
|
44
|
+
const _state_name = "stateTextstateTagstateAttrNamestateAfterNamestateBeforeValuestateHTMLCmtstateRCDATAstateAttrstateURLstateSrcsetstateJSstateJSDqStrstateJSSqStrstateJSTmplLitstateJSRegexpstateJSBlockCmtstateJSLineCmtstateJSHTMLOpenCmtstateJSHTMLCloseCmtstateCSSstateCSSDqStrstateCSSSqStrstateCSSDqURLstateCSSSqURLstateCSSURLstateCSSBlockCmtstateCSSLineCmtstateErrorstateMetaContentstateMetaContentURLstateDead"
|
|
43
45
|
|
|
44
|
-
var _state_index = [...]uint16{0, 9, 17, 30, 44, 60, 72, 83, 92, 100, 111, 118, 130, 142, 156, 169, 184, 198, 216, 235, 243, 256, 269, 282, 295, 306, 322, 337, 347,
|
|
46
|
+
var _state_index = [...]uint16{0, 9, 17, 30, 44, 60, 72, 83, 92, 100, 111, 118, 130, 142, 156, 169, 184, 198, 216, 235, 243, 256, 269, 282, 295, 306, 322, 337, 347, 363, 382, 391}
|
|
45
47
|
|
|
46
48
|
func (i state) String() string {
|
|
47
49
|
if i >= state(len(_state_index)-1) {
|
|
@@ -23,6 +23,8 @@ var transitionFunc = [...]func(context, []byte) (context, int){
|
|
|
23
23
|
stateRCDATA: tSpecialTagEnd,
|
|
24
24
|
stateAttr: tAttr,
|
|
25
25
|
stateURL: tURL,
|
|
26
|
+
stateMetaContent: tMetaContent,
|
|
27
|
+
stateMetaContentURL: tMetaContentURL,
|
|
26
28
|
stateSrcset: tURL,
|
|
27
29
|
stateJS: tJS,
|
|
28
30
|
stateJSDqStr: tJSDelimited,
|
|
@@ -83,6 +85,7 @@ var elementContentType = [...]state{
|
|
|
83
85
|
elementStyle: stateCSS,
|
|
84
86
|
elementTextarea: stateRCDATA,
|
|
85
87
|
elementTitle: stateRCDATA,
|
|
88
|
+
elementMeta: stateText,
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
// tTag is the context transition function for the tag state.
|
|
@@ -93,6 +96,11 @@ func tTag(c context, s []byte) (context, int) {
|
|
|
93
96
|
return c, len(s)
|
|
94
97
|
}
|
|
95
98
|
if s[i] == '>' {
|
|
99
|
+
// Treat <meta> specially, because it doesn't have an end tag, and we
|
|
100
|
+
// want to transition into the correct state/element for it.
|
|
101
|
+
if c.element == elementMeta {
|
|
102
|
+
return context{state: stateText, element: elementNone}, i + 1
|
|
103
|
+
}
|
|
96
104
|
return context{
|
|
97
105
|
state: elementContentType[c.element],
|
|
98
106
|
element: c.element,
|
|
@@ -113,6 +121,8 @@ func tTag(c context, s []byte) (context, int) {
|
|
|
113
121
|
attrName := strings.ToLower(string(s[i:j]))
|
|
114
122
|
if c.element == elementScript && attrName == "type" {
|
|
115
123
|
attr = attrScriptType
|
|
124
|
+
} else if c.element == elementMeta && attrName == "content" {
|
|
125
|
+
attr = attrMetaContent
|
|
116
126
|
} else {
|
|
117
127
|
switch attrType(attrName) {
|
|
118
128
|
case contentTypeURL:
|
|
@@ -162,12 +172,13 @@ func tAfterName(c context, s []byte) (context, int) {
|
|
|
162
172
|
}
|
|
163
173
|
|
|
164
174
|
var attrStartStates = [...]state{
|
|
165
|
-
attrNone:
|
|
166
|
-
attrScript:
|
|
167
|
-
attrScriptType:
|
|
168
|
-
attrStyle:
|
|
169
|
-
attrURL:
|
|
170
|
-
attrSrcset:
|
|
175
|
+
attrNone: stateAttr,
|
|
176
|
+
attrScript: stateJS,
|
|
177
|
+
attrScriptType: stateAttr,
|
|
178
|
+
attrStyle: stateCSS,
|
|
179
|
+
attrURL: stateURL,
|
|
180
|
+
attrSrcset: stateSrcset,
|
|
181
|
+
attrMetaContent: stateMetaContent,
|
|
171
182
|
}
|
|
172
183
|
|
|
173
184
|
// tBeforeValue is the context transition function for stateBeforeValue.
|
|
@@ -203,6 +214,7 @@ var specialTagEndMarkers = [...][]byte{
|
|
|
203
214
|
elementStyle: []byte("style"),
|
|
204
215
|
elementTextarea: []byte("textarea"),
|
|
205
216
|
elementTitle: []byte("title"),
|
|
217
|
+
elementMeta: []byte(""),
|
|
206
218
|
}
|
|
207
219
|
|
|
208
220
|
var (
|
|
@@ -612,6 +624,30 @@ func tError(c context, s []byte) (context, int) {
|
|
|
612
624
|
return c, len(s)
|
|
613
625
|
}
|
|
614
626
|
|
|
627
|
+
// tMetaContent is the context transition function for the meta content attribute state.
|
|
628
|
+
func tMetaContent(c context, s []byte) (context, int) {
|
|
629
|
+
for i := range len(s) {
|
|
630
|
+
if i+3 <= len(s)-1 && bytes.EqualFold(s[i:i+3], []byte("url")) {
|
|
631
|
+
if j := eatWhiteSpace(s, i+3); j < len(s) && s[j] == '=' {
|
|
632
|
+
c.state = stateMetaContentURL
|
|
633
|
+
return c, j + 1
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
return c, len(s)
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
// tMetaContentURL is the context transition function for the "url=" part of a meta content attribute state.
|
|
641
|
+
func tMetaContentURL(c context, s []byte) (context, int) {
|
|
642
|
+
for i := range len(s) {
|
|
643
|
+
if s[i] == ';' {
|
|
644
|
+
c.state = stateMetaContent
|
|
645
|
+
return c, i + 1
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
return c, len(s)
|
|
649
|
+
}
|
|
650
|
+
|
|
615
651
|
// eatAttrName returns the largest j such that s[i:j] is an attribute name.
|
|
616
652
|
// It returns an error if s[i:] does not look like it begins with an
|
|
617
653
|
// attribute name, such as encountering a quote mark without a preceding
|
|
@@ -638,6 +674,7 @@ var elementNameMap = map[string]element{
|
|
|
638
674
|
"style": elementStyle,
|
|
639
675
|
"textarea": elementTextarea,
|
|
640
676
|
"title": elementTitle,
|
|
677
|
+
"meta": elementMeta,
|
|
641
678
|
}
|
|
642
679
|
|
|
643
680
|
// asciiAlpha reports whether c is an ASCII letter.
|
|
@@ -15,7 +15,7 @@ const DefaultGORISCV64 = `rva20u64`
|
|
|
15
15
|
const defaultGOEXPERIMENT = ``
|
|
16
16
|
const defaultGO_EXTLINK_ENABLED = ``
|
|
17
17
|
const defaultGO_LDSO = ``
|
|
18
|
-
const version = `go1.26.
|
|
18
|
+
const version = `go1.26.3`
|
|
19
19
|
const defaultGOOS = runtime.GOOS
|
|
20
20
|
const defaultGOARCH = runtime.GOARCH
|
|
21
21
|
const DefaultGOFIPS140 = `off`
|
|
@@ -40,6 +40,7 @@ var All = []Info{
|
|
|
40
40
|
{Name: "gocacheverify", Package: "cmd/go"},
|
|
41
41
|
{Name: "gotestjsonbuildtext", Package: "cmd/go", Changed: 24, Old: "1"},
|
|
42
42
|
{Name: "gotypesalias", Package: "go/types", Changed: 23, Old: "0"},
|
|
43
|
+
{Name: "htmlmetacontenturlescape", Package: "html/template"},
|
|
43
44
|
{Name: "http2client", Package: "net/http"},
|
|
44
45
|
{Name: "http2debug", Package: "net/http", Opaque: true},
|
|
45
46
|
{Name: "http2server", Package: "net/http"},
|