Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37abdae785 | ||
|
|
1256793012 |
No files matched your search
@@ -1,5 +0,0 @@
|
||||
Security: Bump golang.org/x/text to v0.39.0
|
||||
|
||||
We bumped golang.org/x/text to v0.39.0 to address GO-2026-5970, an infinite loop
|
||||
on invalid input. This unblocks the govulncheck CI check, which fails on fixable
|
||||
vulnerabilities.
|
||||
@@ -10,10 +10,10 @@ require (
|
||||
github.com/MicahParks/keyfunc/v2 v2.1.0
|
||||
github.com/Nerzal/gocloak/v13 v13.9.0
|
||||
github.com/bbalet/stopwords v1.0.0
|
||||
github.com/beevik/etree v1.6.0
|
||||
github.com/beevik/etree v1.7.0
|
||||
github.com/blevesearch/bleve/v2 v2.6.0
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible
|
||||
github.com/coreos/go-oidc/v3 v3.19.0
|
||||
github.com/coreos/go-oidc/v3 v3.20.0
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1
|
||||
github.com/davidbyttow/govips/v2 v2.18.0
|
||||
github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8
|
||||
@@ -21,10 +21,10 @@ require (
|
||||
github.com/egirna/icap-client v0.1.1
|
||||
github.com/gabriel-vasile/mimetype v1.4.13
|
||||
github.com/ggwhite/go-masker v1.1.0
|
||||
github.com/go-chi/chi/v5 v5.3.0
|
||||
github.com/go-chi/chi/v5 v5.3.1
|
||||
github.com/go-chi/httprate v0.16.0
|
||||
github.com/go-chi/render v1.0.3
|
||||
github.com/go-ldap/ldap/v3 v3.4.13
|
||||
github.com/go-ldap/ldap/v3 v3.4.14
|
||||
github.com/go-ldap/ldif v0.0.0-20200320164324-fd88d9b715b3
|
||||
github.com/go-micro/plugins/v4/client/grpc v1.2.1
|
||||
github.com/go-micro/plugins/v4/logger/zerolog v1.2.0
|
||||
@@ -50,7 +50,7 @@ require (
|
||||
github.com/jellydator/ttlcache/v3 v3.4.1
|
||||
github.com/jinzhu/now v1.1.5
|
||||
github.com/justinas/alice v1.2.0
|
||||
github.com/kovidgoyal/imaging v1.8.22
|
||||
github.com/kovidgoyal/imaging v1.8.23
|
||||
github.com/leonelquinteros/gotext v1.7.2
|
||||
github.com/libregraph/idm v0.5.0
|
||||
github.com/libregraph/lico v0.67.0
|
||||
@@ -96,16 +96,16 @@ require (
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0
|
||||
go.opentelemetry.io/otel/sdk v1.44.0
|
||||
go.opentelemetry.io/otel/trace v1.44.0
|
||||
golang.org/x/crypto v0.53.0
|
||||
golang.org/x/crypto v0.54.0
|
||||
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f
|
||||
golang.org/x/image v0.43.0
|
||||
golang.org/x/net v0.56.0
|
||||
golang.org/x/image v0.44.0
|
||||
golang.org/x/net v0.57.0
|
||||
golang.org/x/oauth2 v0.36.0
|
||||
golang.org/x/sync v0.21.0
|
||||
golang.org/x/term v0.44.0
|
||||
golang.org/x/text v0.39.0
|
||||
golang.org/x/sync v0.22.0
|
||||
golang.org/x/term v0.45.0
|
||||
golang.org/x/text v0.40.0
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa
|
||||
google.golang.org/grpc v1.82.0
|
||||
google.golang.org/grpc v1.82.1
|
||||
google.golang.org/protobuf v1.36.11
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
gotest.tools/v3 v3.5.2
|
||||
@@ -186,7 +186,7 @@ require (
|
||||
github.com/fsnotify/fsnotify v1.10.1 // indirect
|
||||
github.com/gdexlab/go-render v1.0.1 // indirect
|
||||
github.com/go-acme/lego/v4 v4.34.0 // indirect
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 // indirect
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8 // indirect
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.9.0 // indirect
|
||||
github.com/go-git/go-git/v5 v5.19.1 // indirect
|
||||
@@ -342,7 +342,7 @@ require (
|
||||
go.yaml.in/yaml/v2 v2.4.4 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/mod v0.37.0 // indirect
|
||||
golang.org/x/sys v0.46.0 // indirect
|
||||
golang.org/x/sys v0.47.0 // indirect
|
||||
golang.org/x/time v0.15.0 // indirect
|
||||
golang.org/x/tools v0.47.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7 // indirect
|
||||
|
||||
@@ -104,8 +104,8 @@ github.com/aws/aws-sdk-go v1.55.8 h1:JRmEUbU52aJQZ2AjX4q4Wu7t4uZjOu71uyNmaWlUkJQ
|
||||
github.com/aws/aws-sdk-go v1.55.8/go.mod h1:ZkViS9AqA6otK+JBBNH2++sx1sgxrPKcSzPPvQkUtXk=
|
||||
github.com/bbalet/stopwords v1.0.0 h1:0TnGycCtY0zZi4ltKoOGRFIlZHv0WqpoIGUsObjztfo=
|
||||
github.com/bbalet/stopwords v1.0.0/go.mod h1:sAWrQoDMfqARGIn4s6dp7OW7ISrshUD8IP2q3KoqPjc=
|
||||
github.com/beevik/etree v1.6.0 h1:u8Kwy8pp9D9XeITj2Z0XtA5qqZEmtJtuXZRQi+j03eE=
|
||||
github.com/beevik/etree v1.6.0/go.mod h1:bh4zJxiIr62SOf9pRzN7UUYaEDa9HEKafK25+sLc0Gc=
|
||||
github.com/beevik/etree v1.7.0 h1:xjBk9O4p4x7D1YajePjfLzdaFC4/uYUENA7P0pv6gXA=
|
||||
github.com/beevik/etree v1.7.0/go.mod h1:bh4zJxiIr62SOf9pRzN7UUYaEDa9HEKafK25+sLc0Gc=
|
||||
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
||||
github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
@@ -188,8 +188,8 @@ github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJ
|
||||
github.com/cloudflare/circl v1.6.3 h1:9GPOhQGF9MCYUeXyMYlqTR6a5gTrgR/fBLXvUgtVcg8=
|
||||
github.com/cloudflare/circl v1.6.3/go.mod h1:2eXP6Qfat4O/Yhh8BznvKnJ+uzEoTQ6jVKJRn81BiS4=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/coreos/go-oidc/v3 v3.19.0 h1:F/xyOi3x1UnG1U27YVnM1N6bHiL1K2upi6U/0qr8r+I=
|
||||
github.com/coreos/go-oidc/v3 v3.19.0/go.mod h1:DYCf24+ncYi+XkIH97GY1+dqoRlbaSI26KVTCI9SrY4=
|
||||
github.com/coreos/go-oidc/v3 v3.20.0 h1:EtE0WIBHk03N+DqGkY4+UONzzZHk7amKt6IyNd7OsZE=
|
||||
github.com/coreos/go-oidc/v3 v3.20.0/go.mod h1:DYCf24+ncYi+XkIH97GY1+dqoRlbaSI26KVTCI9SrY4=
|
||||
github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4=
|
||||
github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec=
|
||||
github.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA=
|
||||
@@ -286,10 +286,10 @@ github.com/go-acme/lego/v4 v4.34.0 h1:oRsIuPJ4ORX7ufviXvelUpBSez2XxeKGwo5pNG9BVe
|
||||
github.com/go-acme/lego/v4 v4.34.0/go.mod h1:gsmdlx/ZS6OUeXbOj0U+VnCLLfEFj4WCYRkcGpZw+pc=
|
||||
github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
|
||||
github.com/go-asn1-ber/asn1-ber v1.4.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 h1:BP4M0CvQ4S3TGls2FvczZtj5Re/2ZzkV9VwqPHH/3Bo=
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
|
||||
github.com/go-chi/chi/v5 v5.3.0 h1:halUjDxhshgXHMrao5bB8eNBXo/rnzwr8m5m36glehM=
|
||||
github.com/go-chi/chi/v5 v5.3.0/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutVsOCto=
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8 h1:H9AZkK22UOmfX8J84ubyaZxKJZ3FMHVwn8swoMML7iQ=
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
|
||||
github.com/go-chi/chi/v5 v5.3.1 h1:3j4HZLGZQ3JpMCrPJF/Jl3mYJfWLKBfNJ6quurUGCf8=
|
||||
github.com/go-chi/chi/v5 v5.3.1/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutVsOCto=
|
||||
github.com/go-chi/httprate v0.16.0 h1:8V5DH9j6pSK6UQoBsTpvMyFxycqaKEIToyPKzHJjUa8=
|
||||
github.com/go-chi/httprate v0.16.0/go.mod h1:A8lo+qRhk+s9LiuP5saS7XCGDXRXMcrueq0NfIuCa/I=
|
||||
github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4=
|
||||
@@ -317,8 +317,8 @@ github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBj
|
||||
github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU=
|
||||
github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0=
|
||||
github.com/go-ldap/ldap/v3 v3.1.7/go.mod h1:5Zun81jBTabRaI8lzN7E1JjyEl1g6zI6u9pd8luAK4Q=
|
||||
github.com/go-ldap/ldap/v3 v3.4.13 h1:+x1nG9h+MZN7h/lUi5Q3UZ0fJ1GyDQYbPvbuH38baDQ=
|
||||
github.com/go-ldap/ldap/v3 v3.4.13/go.mod h1:LxsGZV6vbaK0sIvYfsv47rfh4ca0JXokCoKjZxsszv0=
|
||||
github.com/go-ldap/ldap/v3 v3.4.14 h1:D6PYdEgsaVzsXyr6w/yDC06Ria4uUhWm+Rb+er8lfAs=
|
||||
github.com/go-ldap/ldap/v3 v3.4.14/go.mod h1:S4eJUMUNjDkE0ZJtIZdybwyb03sGGLW6gxXT1Hs8VKA=
|
||||
github.com/go-ldap/ldif v0.0.0-20200320164324-fd88d9b715b3 h1:sfz1YppV05y4sYaW7kXZtrocU/+vimnIWt4cxAYh7+o=
|
||||
github.com/go-ldap/ldif v0.0.0-20200320164324-fd88d9b715b3/go.mod h1:ZXFhGda43Z2TVbfGZefXyMJzsDHhCh0go3bZUcwTx7o=
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
@@ -597,8 +597,8 @@ github.com/kovidgoyal/go-parallel v1.1.1 h1:1OzpNjtrUkBPq3UaqrnvOoB2F9RttSt811ui
|
||||
github.com/kovidgoyal/go-parallel v1.1.1/go.mod h1:BJNIbe6+hxyFWv7n6oEDPj3PA5qSw5OCtf0hcVxWJiw=
|
||||
github.com/kovidgoyal/go-shm v1.0.0 h1:HJEel9D1F9YhULvClEHJLawoRSj/1u/EDV7MJbBPgQo=
|
||||
github.com/kovidgoyal/go-shm v1.0.0/go.mod h1:Yzb80Xf9L3kaoB2RGok9hHwMIt7Oif61kT6t3+VnZds=
|
||||
github.com/kovidgoyal/imaging v1.8.22 h1:CtpoRXQpS79xxJsKu8+LUJJE/0i4FLquJZy0QH+QNlM=
|
||||
github.com/kovidgoyal/imaging v1.8.22/go.mod h1:y8wo4JTv4D+skbtQf6fHg8nA1qtagvCcn8J2Nu5k2Jg=
|
||||
github.com/kovidgoyal/imaging v1.8.23 h1:4WsboyQ/E8tic2kX49P93Rvscg33SPsCwTBG5EZZF54=
|
||||
github.com/kovidgoyal/imaging v1.8.23/go.mod h1:k3Iot3H0v2rSWXIxQISfT3e9wIryqzAHLHCuhG7z9lM=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
@@ -1015,8 +1015,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0
|
||||
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
|
||||
golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto=
|
||||
golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio=
|
||||
golang.org/x/crypto v0.54.0 h1:YLIA59K4fiNzHzjnZt2tUJQjQtUWfWbeHBqKtk3eScw=
|
||||
golang.org/x/crypto v0.54.0/go.mod h1:KWL8ny2AZdGR2cWmzeHrp2azQPGogOv+HeQaVEXC2dk=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
@@ -1031,8 +1031,8 @@ golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f h1:W3F4c+6OLc6H2lb//N1q4WpJk
|
||||
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f/go.mod h1:J1xhfL/vlindoeF/aINzNzt2Bket5bjo9sdOYzOsU80=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.43.0 h1:FLxcP4ec2350nTfOC8ysKtqYSIFbk/QGjw1ZHNP4tsY=
|
||||
golang.org/x/image v0.43.0/go.mod h1:rrpelvGFt+kLPAjPM4HeWPgrl0FtafueU//e5N0qk/Q=
|
||||
golang.org/x/image v0.44.0 h1:+tDekMZED9+LrtB3G5xzRggpVh9CARjZqROla3R3R+I=
|
||||
golang.org/x/image v0.44.0/go.mod h1:V8K3KE9KKKE+pLpQDOeN18w9oacNSvy1tDOirTu4xtY=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
@@ -1099,8 +1099,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
||||
golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o=
|
||||
golang.org/x/net v0.56.0/go.mod h1:D3Ku6r+V6JROoZK144D2XfMHFcMq/0zSfLelVTCFKec=
|
||||
golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE=
|
||||
golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
@@ -1124,8 +1124,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM=
|
||||
golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||
golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
|
||||
golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -1188,8 +1188,8 @@ golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
|
||||
golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
|
||||
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
@@ -1197,8 +1197,8 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
|
||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
|
||||
golang.org/x/term v0.44.0 h1:0rLvDRCtNj0gZkyIXhCyOb2OAzEhLVqc4B+hrsBhrmc=
|
||||
golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y=
|
||||
golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0=
|
||||
golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@@ -1210,8 +1210,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.39.0 h1:UbZz4pLOvn600D6Oh6GGEI6VAmndrEBLv8/6BEXzyus=
|
||||
golang.org/x/text v0.39.0/go.mod h1:3UwRclnC2g0TU9x8PZiyfOajCd1zaUNHF9cvqcQZ+ZM=
|
||||
golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs=
|
||||
golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
@@ -1343,8 +1343,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji
|
||||
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
|
||||
google.golang.org/grpc v1.82.0 h1:vguDnZUPjE26w09A63VoxZPnvPjB5Riyc0mkXPFmAIU=
|
||||
google.golang.org/grpc v1.82.0/go.mod h1:yzTZ1TB1Z3SG+LIYaI+WiE8D5+PZ3ArnrSp8zF3+/ZA=
|
||||
google.golang.org/grpc v1.82.1 h1:NnAxzGRA0677vCa4BUkOAnO5+FfQqVl9iUXeD0IqcGE=
|
||||
google.golang.org/grpc v1.82.1/go.mod h1:yzTZ1TB1Z3SG+LIYaI+WiE8D5+PZ3ArnrSp8zF3+/ZA=
|
||||
google.golang.org/grpc/examples v0.0.0-20211102180624-670c133e568e h1:m7aQHHqd0q89mRwhwS9Bx2rjyl/hsFAeta+uGrHsQaU=
|
||||
google.golang.org/grpc/examples v0.0.0-20211102180624-670c133e568e/go.mod h1:gID3PKrg7pWKntu9Ss6zTLJ0ttC0X9IHgREOCZwbCVU=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
|
||||
+24
@@ -1,3 +1,27 @@
|
||||
Release 1.7.0
|
||||
=============
|
||||
|
||||
**Changes**
|
||||
|
||||
**Breaking changes**
|
||||
|
||||
* To address a security issue, it was necessary to add a `MaxDepth` option to
|
||||
`ReadSettings` to limit the depth of XML trees during parsing. A generous
|
||||
default value of 1024 was chosen to avoid breaking most existing code.
|
||||
However, if your code is processing XML hierarchies with a depth greater
|
||||
than 1024, you will need to assign your `Document` a `ReadSettings` that has
|
||||
a `MaxDepth` set to a higher value.
|
||||
|
||||
**Security Fixes**
|
||||
|
||||
* Limited the depth of XML trees processed by all `ReadFrom` functions during
|
||||
parsing.
|
||||
* Fixed a `CompilePath` index-out-of-range panic that could be caused by a
|
||||
missing path filter key.
|
||||
* Sanitized the contents of XML text, comment, ProcInst and Directive tokens
|
||||
provided by the user.
|
||||
|
||||
|
||||
Release 1.6.0
|
||||
=============
|
||||
|
||||
|
||||
+31
-17
@@ -13,6 +13,7 @@ import (
|
||||
"errors"
|
||||
"io"
|
||||
"iter"
|
||||
"maps"
|
||||
"os"
|
||||
"slices"
|
||||
"strings"
|
||||
@@ -27,6 +28,10 @@ const (
|
||||
// ErrXML is returned when XML parsing fails due to incorrect formatting.
|
||||
var ErrXML = errors.New("etree: invalid XML format")
|
||||
|
||||
// ErrMaxDepth is returned when the depth of the XML tree being read exceeds
|
||||
// the maximum depth allowed by ReadSettings.MaxDepth.
|
||||
var ErrMaxDepth = errors.New("etree: XML tree exceeds maximum depth")
|
||||
|
||||
// cdataPrefix is used to detect CDATA text when ReadSettings.PreserveCData is
|
||||
// true.
|
||||
var cdataPrefix = []byte("<![CDATA[")
|
||||
@@ -76,8 +81,18 @@ type ReadSettings struct {
|
||||
// whether an end element is present. Commonly set to xml.HTMLAutoClose.
|
||||
// Default: nil.
|
||||
AutoClose []string
|
||||
|
||||
// MaxDepth is the maximum depth of the XML tree to parse. If the depth of
|
||||
// the XML tree exceeds this value, all ReadFrom* functions return the
|
||||
// error ErrMaxDepth. If MaxDepth is zero or negative, a depth limit of
|
||||
// 1024 is used. Default: 0 (i.e., a limit of 1024).
|
||||
MaxDepth int
|
||||
}
|
||||
|
||||
// defaultMaxDepth is the maximum depth of an XML tree parsed by ReadFrom*
|
||||
// functions when ReadSettings.MaxDepth is not set to a positive value.
|
||||
const defaultMaxDepth = 1024
|
||||
|
||||
// defaultCharsetReader is used by the xml decoder when the ReadSettings
|
||||
// CharsetReader value is nil. It behaves as a "pass-through", ignoring
|
||||
// the requested charset parameter and skipping conversion altogether.
|
||||
@@ -87,18 +102,9 @@ func defaultCharsetReader(charset string, input io.Reader) (io.Reader, error) {
|
||||
|
||||
// dup creates a duplicate of the ReadSettings object.
|
||||
func (s *ReadSettings) dup() ReadSettings {
|
||||
var entityCopy map[string]string
|
||||
if s.Entity != nil {
|
||||
entityCopy = make(map[string]string)
|
||||
for k, v := range s.Entity {
|
||||
entityCopy[k] = v
|
||||
}
|
||||
}
|
||||
return ReadSettings{
|
||||
CharsetReader: s.CharsetReader,
|
||||
Permissive: s.Permissive,
|
||||
Entity: entityCopy,
|
||||
}
|
||||
c := *s
|
||||
c.Entity = maps.Clone(s.Entity)
|
||||
return c
|
||||
}
|
||||
|
||||
// WriteSettings determine the behavior of the Document's WriteTo* functions.
|
||||
@@ -913,6 +919,11 @@ func (e *Element) readFrom(ri io.Reader, settings ReadSettings) (n int64, err er
|
||||
attrCheck := make(map[xml.Name]int)
|
||||
dec := newDecoder(r, settings)
|
||||
|
||||
maxDepth := settings.MaxDepth
|
||||
if maxDepth <= 0 {
|
||||
maxDepth = defaultMaxDepth
|
||||
}
|
||||
|
||||
var stack stack[*Element]
|
||||
stack.push(e)
|
||||
for {
|
||||
@@ -942,6 +953,9 @@ func (e *Element) readFrom(ri io.Reader, settings ReadSettings) (n int64, err er
|
||||
|
||||
switch t := t.(type) {
|
||||
case xml.StartElement:
|
||||
if len(stack.data) > maxDepth {
|
||||
return r.Bytes(), ErrMaxDepth
|
||||
}
|
||||
e := newElement(t.Name.Space, t.Name.Local, top)
|
||||
if settings.PreserveDuplicateAttrs || len(t.Attr) < 2 {
|
||||
for _, a := range t.Attr {
|
||||
@@ -1622,7 +1636,7 @@ func (c *CharData) Index() int {
|
||||
func (c *CharData) WriteTo(w Writer, s *WriteSettings) {
|
||||
if c.IsCData() {
|
||||
w.WriteString(`<![CDATA[`)
|
||||
w.WriteString(c.Data)
|
||||
sanitizeCData(w, c.Data)
|
||||
w.WriteString(`]]>`)
|
||||
} else {
|
||||
var m escapeMode
|
||||
@@ -1704,7 +1718,7 @@ func (c *Comment) Index() int {
|
||||
// WriteTo serialies the comment to the writer.
|
||||
func (c *Comment) WriteTo(w Writer, s *WriteSettings) {
|
||||
w.WriteString("<!--")
|
||||
w.WriteString(c.Data)
|
||||
sanitizeComment(w, c.Data)
|
||||
w.WriteString("-->")
|
||||
}
|
||||
|
||||
@@ -1769,7 +1783,7 @@ func (d *Directive) Index() int {
|
||||
// WriteTo serializes the XML directive to the writer.
|
||||
func (d *Directive) WriteTo(w Writer, s *WriteSettings) {
|
||||
w.WriteString("<!")
|
||||
w.WriteString(d.Data)
|
||||
sanitizeDirective(w, d.Data)
|
||||
w.WriteString(">")
|
||||
}
|
||||
|
||||
@@ -1837,10 +1851,10 @@ func (p *ProcInst) Index() int {
|
||||
// WriteTo serializes the processing instruction to the writer.
|
||||
func (p *ProcInst) WriteTo(w Writer, s *WriteSettings) {
|
||||
w.WriteString("<?")
|
||||
w.WriteString(p.Target)
|
||||
sanitizeProcInst(w, p.Target)
|
||||
if p.Inst != "" {
|
||||
w.WriteByte(' ')
|
||||
w.WriteString(p.Inst)
|
||||
sanitizeProcInst(w, p.Inst)
|
||||
}
|
||||
w.WriteString("?>")
|
||||
}
|
||||
|
||||
+114
@@ -384,6 +384,120 @@ func escapeString(w Writer, s string, m escapeMode) {
|
||||
w.WriteString(s[last:])
|
||||
}
|
||||
|
||||
// sanitizeCData writes the sanitized contents of a CDATA section to the
|
||||
// writer. XML provides no way to escape the "]]>" sequence within a CDATA
|
||||
// section, so any occurrence of it is split across two CDATA sections.
|
||||
func sanitizeCData(w Writer, s string) {
|
||||
for {
|
||||
i := strings.Index(s, "]]>")
|
||||
if i < 0 {
|
||||
break
|
||||
}
|
||||
w.WriteString(s[:i+2])
|
||||
w.WriteString("]]><![CDATA[")
|
||||
s = s[i+2:]
|
||||
}
|
||||
w.WriteString(s)
|
||||
}
|
||||
|
||||
// sanitizeComment writes the sanitized contents of a comment to the writer.
|
||||
// An XML comment may not contain the string "--", and it may not end with a
|
||||
// '-'. Because XML provides no way to escape these sequences, spaces are
|
||||
// inserted where necessary.
|
||||
func sanitizeComment(w Writer, s string) {
|
||||
last, hyphen := 0, false
|
||||
for i := 0; i < len(s); i++ {
|
||||
if s[i] != '-' {
|
||||
hyphen = false
|
||||
continue
|
||||
}
|
||||
if hyphen {
|
||||
w.WriteString(s[last:i])
|
||||
w.WriteByte(' ')
|
||||
last = i
|
||||
}
|
||||
hyphen = true
|
||||
}
|
||||
w.WriteString(s[last:])
|
||||
if hyphen {
|
||||
w.WriteByte(' ')
|
||||
}
|
||||
}
|
||||
|
||||
// sanitizeProcInst writes the contents of a sanitized processing instruction
|
||||
// to the writer. XML provides no way to escape the "?>" sequence within a
|
||||
// processing instruction, so a space is inserted between the two characters.
|
||||
func sanitizeProcInst(w Writer, s string) {
|
||||
for {
|
||||
i := strings.Index(s, "?>")
|
||||
if i < 0 {
|
||||
break
|
||||
}
|
||||
w.WriteString(s[:i+1])
|
||||
w.WriteByte(' ')
|
||||
s = s[i+1:]
|
||||
}
|
||||
w.WriteString(s)
|
||||
}
|
||||
|
||||
// sanitizeDirective writes the sanitized contents of an XML directive to the
|
||||
// writer.
|
||||
func sanitizeDirective(w Writer, s string) {
|
||||
// The XML decoder reserves the character following "<!" for comments
|
||||
// ('-') and CDATA sections ('['), and it treats "<!>" as an unterminated
|
||||
// directive. Insert a space to avoid conflicts with reserved sequences.
|
||||
scan := s
|
||||
if s == "" || s[0] == '-' || s[0] == '[' {
|
||||
w.WriteByte(' ')
|
||||
} else {
|
||||
scan = s[1:]
|
||||
}
|
||||
|
||||
// A directive's contents may legitimately contain '<' and '>' characters,
|
||||
// so write them without modification when they are balanced.
|
||||
if isDirectiveBalanced(scan) {
|
||||
w.WriteString(s)
|
||||
return
|
||||
}
|
||||
|
||||
// The contents are unbalanced, so escape every character in the string.
|
||||
escapeString(w, s, escapeNormal)
|
||||
}
|
||||
|
||||
// isDirectiveBalanced returns true if the interpreted portion of an XML
|
||||
// directive's contents may be enclosed by "<!" and ">" without changing the
|
||||
// extents of the resulting directive.
|
||||
func isDirectiveBalanced(s string) bool {
|
||||
var quote byte
|
||||
var depth int
|
||||
for i := 0; i < len(s); i++ {
|
||||
switch c := s[i]; {
|
||||
case quote != 0:
|
||||
if c == quote {
|
||||
quote = 0
|
||||
}
|
||||
case c == '\'' || c == '"':
|
||||
quote = c
|
||||
case c == '>':
|
||||
if depth == 0 {
|
||||
return false
|
||||
}
|
||||
depth--
|
||||
case c == '<':
|
||||
if !strings.HasPrefix(s[i+1:], "!--") {
|
||||
depth++
|
||||
break
|
||||
}
|
||||
j := strings.Index(s[i+4:], "-->")
|
||||
if j < 0 {
|
||||
return false
|
||||
}
|
||||
i += 4 + j + 2
|
||||
}
|
||||
}
|
||||
return quote == 0 && depth == 0
|
||||
}
|
||||
|
||||
func isInCharacterRange(r rune) bool {
|
||||
return r == 0x09 ||
|
||||
r == 0x0A ||
|
||||
|
||||
+14
-2
@@ -281,7 +281,11 @@ func (c *compiler) parseSegment(path string) segment {
|
||||
c.err = ErrPath("path has invalid filter [brackets].")
|
||||
break
|
||||
}
|
||||
seg.filters = append(seg.filters, c.parseFilter(fpath[:len(fpath)-1]))
|
||||
filter := c.parseFilter(fpath[:len(fpath)-1])
|
||||
if c.err != ErrPath("") {
|
||||
break
|
||||
}
|
||||
seg.filters = append(seg.filters, filter)
|
||||
}
|
||||
return seg
|
||||
}
|
||||
@@ -320,7 +324,11 @@ func (c *compiler) parseFilter(path string) filter {
|
||||
// Filter contains [@attr='val'], [@attr="val"], [fn()='val'],
|
||||
// [fn()="val"], [tag='val'] or [tag="val"]?
|
||||
eqindex := strings.IndexByte(path, '=')
|
||||
if eqindex >= 0 && eqindex+1 < len(path) {
|
||||
if eqindex == 0 {
|
||||
c.err = ErrPath("path contains a filter expression with no key.")
|
||||
return nil
|
||||
}
|
||||
if eqindex > 0 && eqindex+1 < len(path) {
|
||||
quote := path[eqindex+1]
|
||||
if quote == '\'' || quote == '"' {
|
||||
rindex := nextIndex(path, quote, eqindex+2)
|
||||
@@ -334,6 +342,10 @@ func (c *compiler) parseFilter(path string) filter {
|
||||
|
||||
switch {
|
||||
case key[0] == '@':
|
||||
if len(key) == 1 {
|
||||
c.err = ErrPath("path contains a filter expression with no key.")
|
||||
return nil
|
||||
}
|
||||
return newFilterAttrVal(key[1:], value)
|
||||
case strings.HasSuffix(key, "()"):
|
||||
name := key[:len(key)-2]
|
||||
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
// Package oidc implements OpenID Connect client logic for the golang.org/x/oauth2 package.
|
||||
//
|
||||
// Construct a [Provider] and [oauth2.Config] through the identity provider's
|
||||
// discovery document with [NewProvider], and construct an ID Token verifier
|
||||
// with [Provider.Verifier]:
|
||||
//
|
||||
// provider, err := oidc.NewProvider(ctx, "https://accounts.google.com")
|
||||
// if err != nil {
|
||||
// // handle error
|
||||
// }
|
||||
//
|
||||
// // Configure an OpenID Connect aware OAuth2 client.
|
||||
// oauth2Config := oauth2.Config{
|
||||
// ClientID: clientID,
|
||||
// ClientSecret: clientSecret,
|
||||
// RedirectURL: redirectURL,
|
||||
// // Discovery returns the OAuth2 endpoints.
|
||||
// Endpoint: provider.Endpoint(),
|
||||
// // "openid" is a required scope for OpenID Connect flows.
|
||||
// Scopes: []string{oidc.ScopeOpenID, oidc.ScopeProfile, oidc.ScopeEmail},
|
||||
// }
|
||||
//
|
||||
// idTokenVerifier := provider.Verifier(&oidc.Config{ClientID: clientID})
|
||||
//
|
||||
// OAuth 2.0 redirects then opt into the OpenID Connect flow with [ScopeOpenID]:
|
||||
//
|
||||
// func handleRedirect(w http.ResponseWriter, r *http.Request) {
|
||||
// http.Redirect(w, r, oauth2Config.AuthCodeURL(state), http.StatusFound)
|
||||
// }
|
||||
//
|
||||
// When handling an OAuth 2.0 response, an [IDTokenVerifier] can be used to
|
||||
// validate the "id_token" payload, containing well-known fields such as the
|
||||
// user's email, name, and picture URL:
|
||||
//
|
||||
// func handleOAuth2Callback(w http.ResponseWriter, r *http.Request) {
|
||||
// // Verify state and other OAuth 2.0 responses.
|
||||
//
|
||||
// // Perform standard token exchange.
|
||||
// oauth2Token, err := oauth2Config.Exchange(r.Context(), r.URL.Query().Get("code"))
|
||||
// if err != nil {
|
||||
// // ...
|
||||
// }
|
||||
// // Extract the ID Token from OAuth2 token.
|
||||
// rawIDToken, ok := oauth2Token.Extra("id_token").(string)
|
||||
// if !ok {
|
||||
// // ...
|
||||
// }
|
||||
// // Parse and verify ID Token payload.
|
||||
// idToken, err := idTokenVerifier.Verify(r.Context(), rawIDToken)
|
||||
// if err != nil {
|
||||
// // ...
|
||||
// }
|
||||
// // Parse well-known claims from the token.
|
||||
// // https://openid.net/specs/openid-connect-core-1_0.html#Claims
|
||||
// var claims struct {
|
||||
// Email string `json:"email"`
|
||||
// EmailVerified bool `json:"email_verified"`
|
||||
// Name string `json:"name"`
|
||||
// Picture string `json:"picture"`
|
||||
// }
|
||||
// if err := idToken.Claims(&claims); err != nil {
|
||||
// // ...
|
||||
// }
|
||||
// }
|
||||
package oidc
|
||||
+8
@@ -30,3 +30,11 @@ var allAlgs = []jose.SignatureAlgorithm{
|
||||
jose.PS512,
|
||||
jose.EdDSA,
|
||||
}
|
||||
|
||||
var supportedJOSEAlgs = map[string]bool{}
|
||||
|
||||
func init() {
|
||||
for _, alg := range allAlgs {
|
||||
supportedJOSEAlgs[string(alg)] = true
|
||||
}
|
||||
}
|
||||
+58
-6
@@ -6,6 +6,7 @@ import (
|
||||
"crypto/ecdsa"
|
||||
"crypto/ed25519"
|
||||
"crypto/rsa"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -17,8 +18,8 @@ import (
|
||||
|
||||
// StaticKeySet is a verifier that validates JWT against a static set of public keys.
|
||||
type StaticKeySet struct {
|
||||
// PublicKeys used to verify the JWT. Supported types are *rsa.PublicKey and
|
||||
// *ecdsa.PublicKey.
|
||||
// PublicKeys used to verify the JWT. Supported types are *rsa.PublicKey,
|
||||
// *ecdsa.PublicKey, and ed25519.PublicKey.
|
||||
PublicKeys []crypto.PublicKey
|
||||
}
|
||||
|
||||
@@ -53,8 +54,10 @@ func (s *StaticKeySet) VerifySignature(ctx context.Context, jwt string) ([]byte,
|
||||
// exposed for providers that don't support discovery or to prevent round trips to the
|
||||
// discovery URL.
|
||||
//
|
||||
// The returned KeySet is a long lived verifier that caches keys based on any
|
||||
// keys change. Reuse a common remote key set instead of creating new ones as needed.
|
||||
// The returned KeySet is a long lived verifier that caches keys in memory,
|
||||
// re-fetching from the remote URL when it encounters a key ID it hasn't seen.
|
||||
// Reuse a single remote key set rather than creating a new one for each
|
||||
// verification.
|
||||
func NewRemoteKeySet(ctx context.Context, jwksURL string) *RemoteKeySet {
|
||||
return newRemoteKeySet(ctx, jwksURL)
|
||||
}
|
||||
@@ -123,7 +126,7 @@ func (i *inflight) result() ([]jose.JSONWebKey, error) {
|
||||
return i.keys, i.err
|
||||
}
|
||||
|
||||
// paresdJWTKey is a context key that allows common setups to avoid parsing the
|
||||
// parsedJWTKey is a context key that allows common setups to avoid parsing the
|
||||
// JWT twice. It holds a *jose.JSONWebSignature value.
|
||||
var parsedJWTKey contextKey
|
||||
|
||||
@@ -233,6 +236,55 @@ func (r *RemoteKeySet) keysFromRemote(ctx context.Context) ([]jose.JSONWebKey, e
|
||||
}
|
||||
}
|
||||
|
||||
// jwkJSON implements custom logic for unmarshaling JSON Web Key Sets.
|
||||
type jwkJSON struct {
|
||||
Keys []jose.JSONWebKey
|
||||
}
|
||||
|
||||
func (j *jwkJSON) UnmarshalJSON(data []byte) error {
|
||||
var raw struct {
|
||||
Keys []json.RawMessage `json:"keys"`
|
||||
}
|
||||
if err := json.Unmarshal(data, &raw); err != nil {
|
||||
return err
|
||||
}
|
||||
// For each key, attempt to determine if the algorithm is supported before
|
||||
// unmarshaling the key. This allows us to ignore keys with unsupported
|
||||
// algorithms, rather than failing to load the entire set.
|
||||
for _, key := range raw.Keys {
|
||||
var metadata struct {
|
||||
Alg string `json:"alg"`
|
||||
}
|
||||
if err := json.Unmarshal(key, &metadata); err != nil {
|
||||
return err
|
||||
}
|
||||
if metadata.Alg != "" {
|
||||
// Algorithms are technically optional, but if the key advertises an
|
||||
// algorithm we don't support, ignore it rather than failing to load
|
||||
// the entire key set.
|
||||
//
|
||||
// https://datatracker.ietf.org/doc/html/rfc7517#section-4.4
|
||||
//
|
||||
// This skip is currently implemented due to secp256k1, which some
|
||||
// providers use for signing with "ES256K". While we could also
|
||||
// ignore the curve, this seems like a more general check in case
|
||||
// providers start throwing in post-quantum algorithims or something
|
||||
// like that.
|
||||
//
|
||||
// https://github.com/coreos/go-oidc/issues/490
|
||||
if !supportedJOSEAlgs[metadata.Alg] {
|
||||
continue
|
||||
}
|
||||
}
|
||||
var jwk jose.JSONWebKey
|
||||
if err := json.Unmarshal(key, &jwk); err != nil {
|
||||
return err
|
||||
}
|
||||
j.Keys = append(j.Keys, jwk)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *RemoteKeySet) updateKeys() ([]jose.JSONWebKey, error) {
|
||||
req, err := http.NewRequest("GET", r.jwksURL, nil)
|
||||
if err != nil {
|
||||
@@ -255,7 +307,7 @@ func (r *RemoteKeySet) updateKeys() ([]jose.JSONWebKey, error) {
|
||||
return nil, fmt.Errorf("oidc: get keys failed: %s %s", resp.Status, body)
|
||||
}
|
||||
|
||||
var keySet jose.JSONWebKeySet
|
||||
var keySet jwkJSON
|
||||
err = unmarshalResp(resp, body, &keySet)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("oidc: failed to decode keys: %v %s", err, body)
|
||||
|
||||
+4
-3
@@ -5,6 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"slices"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -37,7 +38,7 @@ type LogoutToken struct {
|
||||
Expiry time.Time
|
||||
// Optional session ID claim ("sid").
|
||||
//
|
||||
// The exact semantics of session IDs very between identity providers. Use
|
||||
// The exact semantics of session IDs vary between identity providers. Use
|
||||
// your provider's documentation to determine what this correlates to and
|
||||
// how it should be handled.
|
||||
SessionID string
|
||||
@@ -98,7 +99,7 @@ type logoutTokenJSON struct {
|
||||
// }
|
||||
// verifier := provider.Verifier(oidcConfig)
|
||||
//
|
||||
// mux.HandleFunc("POST /logout", func(w http.ResponseWriter, r *http.Reequest) {
|
||||
// mux.HandleFunc("POST /logout", func(w http.ResponseWriter, r *http.Request) {
|
||||
// rawLogoutToken := r.PostFormValue("logout_token")
|
||||
// if rawLogoutToken == "" {
|
||||
// // ...
|
||||
@@ -163,7 +164,7 @@ func (v *IDTokenVerifier) VerifyLogout(ctx context.Context, rawLogoutToken strin
|
||||
|
||||
if !v.config.SkipClientIDCheck {
|
||||
if v.config.ClientID != "" {
|
||||
if !contains(t.Audience, v.config.ClientID) {
|
||||
if !slices.Contains(t.Audience, v.config.ClientID) {
|
||||
return nil, fmt.Errorf("oidc: expected logout token audience %q got %q", v.config.ClientID, t.Audience)
|
||||
}
|
||||
} else {
|
||||
|
||||
+115
-12
@@ -1,4 +1,3 @@
|
||||
// Package oidc implements OpenID Connect client logic for the golang.org/x/oauth2 package.
|
||||
package oidc
|
||||
|
||||
import (
|
||||
@@ -24,6 +23,26 @@ const (
|
||||
// ScopeOpenID is the mandatory scope for all OpenID Connect OAuth2 requests.
|
||||
ScopeOpenID = "openid"
|
||||
|
||||
// ScopeProfile can be used to request information about the user's profile,
|
||||
// such as "name", "picture", etc.
|
||||
//
|
||||
// The exact set of claims supported by identity providers differs widely,
|
||||
// though "name" and "picture" are commonly returned.
|
||||
//
|
||||
// See: https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims
|
||||
ScopeProfile = "profile"
|
||||
|
||||
// ScopeEmail can be used to request the user's email address through the
|
||||
// "email" and "email_verified" claims.
|
||||
//
|
||||
// What it means to verify an email isn't well defined. Clients can
|
||||
// generally throw out emails when the "emvail_verified" claim is false, but
|
||||
// should consult identity provider specific docs if attempting to ensure
|
||||
// that the user controls the returned email address.
|
||||
//
|
||||
// See: https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims
|
||||
ScopeEmail = "email"
|
||||
|
||||
// ScopeOfflineAccess is an optional scope defined by OpenID Connect for requesting
|
||||
// OAuth2 refresh tokens.
|
||||
//
|
||||
@@ -92,7 +111,24 @@ func doRequest(ctx context.Context, req *http.Request) (*http.Response, error) {
|
||||
return client.Do(req.WithContext(ctx))
|
||||
}
|
||||
|
||||
// Provider represents an OpenID Connect server's configuration.
|
||||
// Provider represents an OpenID Connect server's configuration, fetched from
|
||||
// the discovery document.
|
||||
//
|
||||
// To access fields in the discovery document that aren't exposed directly
|
||||
// through this package's API, use the [Provider.Claims] method. For example, to
|
||||
// access the registration or end session endpoints:
|
||||
//
|
||||
// p, err := oidc.NewProvider(ctx, "https://issuer.example.com")
|
||||
// if err != nil {
|
||||
// // ...
|
||||
// }
|
||||
// var metadata struct {
|
||||
// EndSessionEndpoint string `json:"end_session_endpoint"`
|
||||
// RegistrationEndpoint string `json:"registration_endpoint"`
|
||||
// }
|
||||
// if err := p.Claims(&metadata); err != nil {
|
||||
// // ...
|
||||
// }
|
||||
type Provider struct {
|
||||
issuer string
|
||||
authURL string
|
||||
@@ -213,6 +249,8 @@ type ProviderConfig struct {
|
||||
//
|
||||
// The provided context is only used for [http.Client] configuration through
|
||||
// [ClientContext], not cancelation.
|
||||
//
|
||||
// For providers that implement discovery, use [NewProvider] instead.
|
||||
func (p *ProviderConfig) NewProvider(ctx context.Context) *Provider {
|
||||
return &Provider{
|
||||
issuer: p.IssuerURL,
|
||||
@@ -226,12 +264,36 @@ func (p *ProviderConfig) NewProvider(ctx context.Context) *Provider {
|
||||
}
|
||||
}
|
||||
|
||||
// IssuerMismatchError is returned by [NewProvider] when the "iss" value
|
||||
// reported by the upstream is different than the expected value.
|
||||
//
|
||||
// Issuer mismatches can occur due to trailing slashes ("https://example.com"
|
||||
// vs. "https://example.com/") or represent significant misconfiguration for
|
||||
// multi-tenant issuers.
|
||||
//
|
||||
// Issuers must match exactly as they are also used to validate ID Tokens.
|
||||
//
|
||||
// https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata
|
||||
type IssuerMismatchError struct {
|
||||
// The value provided to this package. The expected value.
|
||||
Provided string
|
||||
// The value advertised by the discovery document.
|
||||
Discovered string
|
||||
}
|
||||
|
||||
func (e *IssuerMismatchError) Error() string {
|
||||
return fmt.Sprintf("oidc: issuer URL provided to client (%q) did not match the issuer URL returned by provider (%q)", e.Provided, e.Discovered)
|
||||
}
|
||||
|
||||
// NewProvider uses the OpenID Connect discovery mechanism to construct a Provider.
|
||||
// The issuer is the URL identifier for the service. For example: "https://accounts.google.com"
|
||||
// or "https://login.salesforce.com".
|
||||
//
|
||||
// If the "iss" value returned in the discovery document doesn't match the value
|
||||
// provided here, [IssuerMismatchError] is returned.
|
||||
//
|
||||
// OpenID Connect providers that don't implement discovery or host the discovery
|
||||
// document at a non-spec complaint path (such as requiring a URL parameter),
|
||||
// document at a non-spec compliant path (such as requiring a URL parameter),
|
||||
// should use [ProviderConfig] instead.
|
||||
//
|
||||
// See: https://openid.net/specs/openid-connect-discovery-1_0.html
|
||||
@@ -267,7 +329,10 @@ func NewProvider(ctx context.Context, issuer string) (*Provider, error) {
|
||||
issuerURL = issuer
|
||||
}
|
||||
if p.Issuer != issuerURL && !skipIssuerValidation {
|
||||
return nil, fmt.Errorf("oidc: issuer URL provided to client (%q) did not match the issuer URL returned by provider (%q)", issuer, p.Issuer)
|
||||
return nil, &IssuerMismatchError{
|
||||
Provided: issuerURL,
|
||||
Discovered: p.Issuer,
|
||||
}
|
||||
}
|
||||
var algs []string
|
||||
for _, a := range p.Algorithms {
|
||||
@@ -301,7 +366,7 @@ func NewProvider(ctx context.Context, issuer string) (*Provider, error) {
|
||||
//
|
||||
// For a list of fields defined by the OpenID Connect spec see:
|
||||
// https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata
|
||||
func (p *Provider) Claims(v interface{}) error {
|
||||
func (p *Provider) Claims(v any) error {
|
||||
if p.rawClaims == nil {
|
||||
return errors.New("oidc: claims not set")
|
||||
}
|
||||
@@ -340,7 +405,7 @@ type userInfoRaw struct {
|
||||
}
|
||||
|
||||
// Claims unmarshals the raw JSON object claims into the provided object.
|
||||
func (u *UserInfo) Claims(v interface{}) error {
|
||||
func (u *UserInfo) Claims(v any) error {
|
||||
if u.claims == nil {
|
||||
return errors.New("oidc: claims not set")
|
||||
}
|
||||
@@ -348,6 +413,44 @@ func (u *UserInfo) Claims(v interface{}) error {
|
||||
}
|
||||
|
||||
// UserInfo uses the token source to query the provider's user info endpoint.
|
||||
//
|
||||
// It's fewer round trips and better supported to validate the ID Token with
|
||||
// [Provider.Verifier], rather than using the UserInfo endpoint. The ID Token
|
||||
// contains all information [UserInfo] provides:
|
||||
//
|
||||
// p, err := oidc.NewProvider(ctx, "https://issuer.example.com")
|
||||
// if err != nil {
|
||||
// // ...
|
||||
// }
|
||||
// config := &oidc.Config{
|
||||
// ClientID: clientID,
|
||||
// }
|
||||
// v := p.Verifier(config)
|
||||
// http.HandleFunc("/callback", func(w http.ResponseWriter, r *http.Request) {
|
||||
// oauth2Token, err := config.Exchange(ctx, r.URL.Query().Get("code"))
|
||||
// if err != nil {
|
||||
// // ...
|
||||
// }
|
||||
// rawIDToken, ok := oauth2Token.Extra("id_token").(string)
|
||||
// if !ok {
|
||||
// // ...
|
||||
// }
|
||||
// idToken, err := verifier.Verify(ctx, rawIDToken)
|
||||
// if err != nil {
|
||||
// // ...
|
||||
// }
|
||||
// // https://openid.net/specs/openid-connect-core-1_0.html#Claims
|
||||
// var claims struct {
|
||||
// Email string `json:"email"`
|
||||
// EmailVerified bool `json:"email_verified"`
|
||||
// Name string `json:"name"`
|
||||
// Picture string `json:"picture"`
|
||||
// }
|
||||
// if err := idToken.Claims(&claims); err != nil {
|
||||
// // ...
|
||||
// }
|
||||
// // Use claims...
|
||||
// })
|
||||
func (p *Provider) UserInfo(ctx context.Context, tokenSource oauth2.TokenSource) (*UserInfo, error) {
|
||||
if p.userInfoURL == "" {
|
||||
return nil, errors.New("oidc: user info endpoint is not supported by this provider")
|
||||
@@ -425,7 +528,7 @@ type IDToken struct {
|
||||
// A unique string which identifies the end user.
|
||||
Subject string
|
||||
|
||||
// Expiry of the token. Ths package will not process tokens that have
|
||||
// Expiry of the token. This package will not process tokens that have
|
||||
// expired unless that validation is explicitly turned off.
|
||||
Expiry time.Time
|
||||
// When the token was issued by the provider.
|
||||
@@ -433,7 +536,7 @@ type IDToken struct {
|
||||
|
||||
// Initial nonce provided during the authentication redirect.
|
||||
//
|
||||
// This package does NOT provided verification on the value of this field
|
||||
// This package does NOT provide verification on the value of this field
|
||||
// and it's the user's responsibility to ensure it contains a valid value.
|
||||
Nonce string
|
||||
|
||||
@@ -465,15 +568,15 @@ type IDToken struct {
|
||||
// if err := idToken.Claims(&claims); err != nil {
|
||||
// // handle error
|
||||
// }
|
||||
func (i *IDToken) Claims(v interface{}) error {
|
||||
func (i *IDToken) Claims(v any) error {
|
||||
if i.claims == nil {
|
||||
return errors.New("oidc: claims not set")
|
||||
}
|
||||
return json.Unmarshal(i.claims, v)
|
||||
}
|
||||
|
||||
// VerifyAccessToken verifies that the hash of the access token that corresponds to the iD token
|
||||
// matches the hash in the id token. It returns an error if the hashes don't match.
|
||||
// VerifyAccessToken verifies that the hash of the access token that corresponds to the ID token
|
||||
// matches the hash in the ID token. It returns an error if the hashes don't match.
|
||||
// It is the caller's responsibility to ensure that the optional access token hash is present for the ID token
|
||||
// before calling this method. See https://openid.net/specs/openid-connect-core-1_0.html#CodeIDToken
|
||||
func (i *IDToken) VerifyAccessToken(accessToken string) error {
|
||||
@@ -570,7 +673,7 @@ func (j *jsonTime) UnmarshalJSON(b []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func unmarshalResp(r *http.Response, body []byte, v interface{}) error {
|
||||
func unmarshalResp(r *http.Response, body []byte, v any) error {
|
||||
err := json.Unmarshal(body, &v)
|
||||
if err == nil {
|
||||
return nil
|
||||
|
||||
+17
-24
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"slices"
|
||||
"time"
|
||||
|
||||
jose "github.com/go-jose/go-jose/v4"
|
||||
@@ -17,10 +18,10 @@ const (
|
||||
issuerGoogleAccountsNoScheme = "accounts.google.com"
|
||||
)
|
||||
|
||||
// TokenExpiredError indicates that Verify or VerifyLogout failed because the
|
||||
// token was expired. This error does NOT indicate that the token is not also
|
||||
// invalid for other reasons. Other checks might have failed if the expiration
|
||||
// check had not failed.
|
||||
// TokenExpiredError indicates that [IDTokenVerifier.Verify] or
|
||||
// [IDTokenVerifier.VerifyLogout] failed because the token was expired. This
|
||||
// error does NOT indicate that the token is not also invalid for other reasons.
|
||||
// Other checks might have failed if the expiration check had not failed.
|
||||
type TokenExpiredError struct {
|
||||
// Expiry is the time when the token expired.
|
||||
Expiry time.Time
|
||||
@@ -30,7 +31,7 @@ func (e *TokenExpiredError) Error() string {
|
||||
return fmt.Sprintf("oidc: token is expired (Token Expiry: %v)", e.Expiry)
|
||||
}
|
||||
|
||||
// KeySet is a set of publc JSON Web Keys that can be used to validate the signature
|
||||
// KeySet is a set of public JSON Web Keys that can be used to validate the signature
|
||||
// of JSON web tokens. This is expected to be backed by a remote key set through
|
||||
// provider metadata discovery or an in-memory set of keys delivered out-of-band.
|
||||
type KeySet interface {
|
||||
@@ -55,8 +56,8 @@ type IDTokenVerifier struct {
|
||||
// NewVerifier returns a verifier manually constructed from a key set and issuer URL.
|
||||
//
|
||||
// It's easier to use provider discovery to construct an IDTokenVerifier than creating
|
||||
// one directly. This method is intended to be used with provider that don't support
|
||||
// metadata discovery, or avoiding round trips when the key set URL is already known.
|
||||
// one directly. This method is intended to be used with providers that don't support
|
||||
// metadata discovery, or to avoid round trips when the key set URL is already known.
|
||||
//
|
||||
// This constructor can be used to create a verifier directly using the issuer URL and
|
||||
// JSON Web Key Set URL without using discovery:
|
||||
@@ -82,8 +83,8 @@ type Config struct {
|
||||
ClientID string
|
||||
// If specified, only this set of algorithms may be used to sign the JWT.
|
||||
//
|
||||
// If the IDTokenVerifier is created from a provider with (*Provider).Verifier, this
|
||||
// defaults to the set of algorithms the provider supports. Otherwise this values
|
||||
// If the IDTokenVerifier is created from a provider with [Provider.Verifier], this
|
||||
// defaults to the set of algorithms the provider supports. Otherwise this value
|
||||
// defaults to RS256.
|
||||
SupportedSigningAlgs []string
|
||||
|
||||
@@ -92,7 +93,7 @@ type Config struct {
|
||||
// If true, token expiry is not checked.
|
||||
SkipExpiryCheck bool
|
||||
|
||||
// SkipIssuerCheck is intended for specialized cases where the the caller wishes to
|
||||
// SkipIssuerCheck is intended for specialized cases where the caller wishes to
|
||||
// defer issuer validation. When enabled, callers MUST independently verify the Token's
|
||||
// Issuer is a known good value.
|
||||
//
|
||||
@@ -117,8 +118,9 @@ type Config struct {
|
||||
}
|
||||
|
||||
// VerifierContext returns an IDTokenVerifier that uses the provider's key set to
|
||||
// verify JWTs. As opposed to Verifier, the context is used to configure requests
|
||||
// to the upstream JWKs endpoint. The provided context's cancellation is ignored.
|
||||
// verify JWTs. As opposed to [Provider.Verifier], the context is used to configure
|
||||
// requests to the upstream JWKs endpoint. The provided context's cancellation is
|
||||
// ignored.
|
||||
func (p *Provider) VerifierContext(ctx context.Context, config *Config) *IDTokenVerifier {
|
||||
return p.newVerifier(NewRemoteKeySet(ctx, p.jwksURL), config)
|
||||
}
|
||||
@@ -126,7 +128,7 @@ func (p *Provider) VerifierContext(ctx context.Context, config *Config) *IDToken
|
||||
// Verifier returns an IDTokenVerifier that uses the provider's key set to verify JWTs.
|
||||
//
|
||||
// The returned verifier uses a background context for all requests to the upstream
|
||||
// JWKs endpoint. To control that context, use VerifierContext instead.
|
||||
// JWKs endpoint. To control that context, use [Provider.VerifierContext] instead.
|
||||
func (p *Provider) Verifier(config *Config) *IDTokenVerifier {
|
||||
return p.newVerifier(p.remoteKeySet(), config)
|
||||
}
|
||||
@@ -142,15 +144,6 @@ func (p *Provider) newVerifier(keySet KeySet, config *Config) *IDTokenVerifier {
|
||||
return NewVerifier(p.issuer, keySet, config)
|
||||
}
|
||||
|
||||
func contains(sli []string, ele string) bool {
|
||||
for _, s := range sli {
|
||||
if s == ele {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Returns the Claims from the distributed JWT token
|
||||
func resolveDistributedClaim(ctx context.Context, verifier *IDTokenVerifier, src claimSource) ([]byte, error) {
|
||||
req, err := http.NewRequest("GET", src.Endpoint, nil)
|
||||
@@ -187,7 +180,7 @@ func resolveDistributedClaim(ctx context.Context, verifier *IDTokenVerifier, src
|
||||
// Verify parses a raw ID Token, verifies it's been signed by the provider, performs
|
||||
// any additional checks depending on the Config, and returns the payload.
|
||||
//
|
||||
// Verify does NOT do nonce validation, which is the callers responsibility.
|
||||
// Verify does NOT do nonce validation, which is the caller's responsibility.
|
||||
//
|
||||
// See: https://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation
|
||||
//
|
||||
@@ -257,7 +250,7 @@ func (v *IDTokenVerifier) Verify(ctx context.Context, rawIDToken string) (*IDTok
|
||||
// This check DOES NOT ensure that the ClientID is the party to which the ID Token was issued (i.e. Authorized party).
|
||||
if !v.config.SkipClientIDCheck {
|
||||
if v.config.ClientID != "" {
|
||||
if !contains(t.Audience, v.config.ClientID) {
|
||||
if !slices.Contains(t.Audience, v.config.ClientID) {
|
||||
return nil, fmt.Errorf("oidc: expected audience %q got %q", v.config.ClientID, t.Audience)
|
||||
}
|
||||
} else {
|
||||
|
||||
+23
-10
@@ -19,6 +19,10 @@ import (
|
||||
// no limit.
|
||||
var MaxPacketLengthBytes int64 = math.MaxInt32
|
||||
|
||||
// MaxNestingDepth specifies the maximum allowed nesting depth when calling ReadPacket, DecodePacket, or
|
||||
// DecodePacketErr. Set to 0 for no limit.
|
||||
var MaxNestingDepth int = 1000
|
||||
|
||||
type Packet struct {
|
||||
Identifier
|
||||
Value interface{}
|
||||
@@ -218,7 +222,7 @@ func printPacket(out io.Writer, p *Packet, indent int, printBytes bool) {
|
||||
|
||||
// ReadPacket reads a single Packet from the reader.
|
||||
func ReadPacket(reader io.Reader) (*Packet, error) {
|
||||
p, _, err := readPacket(reader)
|
||||
p, _, err := readPacket(reader, 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -278,7 +282,7 @@ func int64Length(i int64) (numBytes int) {
|
||||
// DecodePacket decodes the given bytes into a single Packet
|
||||
// If a decode error is encountered, nil is returned.
|
||||
func DecodePacket(data []byte) *Packet {
|
||||
p, _, _ := readPacket(bytes.NewBuffer(data))
|
||||
p, _, _ := readPacket(bytes.NewBuffer(data), 0)
|
||||
|
||||
return p
|
||||
}
|
||||
@@ -286,7 +290,7 @@ func DecodePacket(data []byte) *Packet {
|
||||
// DecodePacketErr decodes the given bytes into a single Packet
|
||||
// If a decode error is encountered, nil is returned.
|
||||
func DecodePacketErr(data []byte) (*Packet, error) {
|
||||
p, _, err := readPacket(bytes.NewBuffer(data))
|
||||
p, _, err := readPacket(bytes.NewBuffer(data), 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -294,12 +298,20 @@ func DecodePacketErr(data []byte) (*Packet, error) {
|
||||
}
|
||||
|
||||
// readPacket reads a single Packet from the reader, returning the number of bytes read.
|
||||
func readPacket(reader io.Reader) (*Packet, int, error) {
|
||||
func readPacket(reader io.Reader, depth int) (*Packet, int, error) {
|
||||
if MaxNestingDepth > 0 && depth >= MaxNestingDepth {
|
||||
return nil, 0, fmt.Errorf("nesting depth %d exceeds maximum %d", depth, MaxNestingDepth)
|
||||
}
|
||||
|
||||
identifier, length, read, err := readHeader(reader)
|
||||
if err != nil {
|
||||
return nil, read, err
|
||||
}
|
||||
|
||||
if length != LengthIndefinite && MaxPacketLengthBytes > 0 && int64(length) > MaxPacketLengthBytes {
|
||||
return nil, read, fmt.Errorf("length %d greater than maximum %d", length, MaxPacketLengthBytes)
|
||||
}
|
||||
|
||||
p := &Packet{
|
||||
Identifier: identifier,
|
||||
}
|
||||
@@ -326,13 +338,19 @@ func readPacket(reader io.Reader) (*Packet, int, error) {
|
||||
}
|
||||
|
||||
// Read the next packet
|
||||
child, r, err := readPacket(reader)
|
||||
child, r, err := readPacket(reader, depth+1)
|
||||
if err != nil {
|
||||
return nil, read, unexpectedEOF(err)
|
||||
}
|
||||
contentRead += r
|
||||
read += r
|
||||
|
||||
// Enforce the aggregate size limit for constructed packets. Indefinite length declares
|
||||
// no bound up front, so the content bytes are only known as they are read.
|
||||
if MaxPacketLengthBytes > 0 && int64(contentRead) > MaxPacketLengthBytes {
|
||||
return nil, read, fmt.Errorf("length %d greater than maximum %d", contentRead, MaxPacketLengthBytes)
|
||||
}
|
||||
|
||||
// Test is this is the EOC marker for our packet
|
||||
if isEOCPacket(child) {
|
||||
if length == LengthIndefinite {
|
||||
@@ -351,11 +369,6 @@ func readPacket(reader io.Reader) (*Packet, int, error) {
|
||||
return nil, read, errors.New("indefinite length used with primitive type")
|
||||
}
|
||||
|
||||
// Read definite-length content
|
||||
if MaxPacketLengthBytes > 0 && int64(length) > MaxPacketLengthBytes {
|
||||
return nil, read, fmt.Errorf("length %d greater than maximum %d", length, MaxPacketLengthBytes)
|
||||
}
|
||||
|
||||
var content []byte
|
||||
if length > 0 {
|
||||
// Read the content and limit it to the parsed length.
|
||||
|
||||
+5
-4
@@ -40,7 +40,7 @@ func readLength(reader io.Reader) (length int, read int, err error) {
|
||||
}
|
||||
|
||||
// Accumulate into a 64-bit variable
|
||||
var length64 int64
|
||||
var length64 uint64
|
||||
for i := 0; i < lengthBytes; i++ {
|
||||
b, err = readByte(reader)
|
||||
if err != nil {
|
||||
@@ -53,13 +53,14 @@ func readLength(reader io.Reader) (length int, read int, err error) {
|
||||
|
||||
// x.600, 8.1.3.5
|
||||
length64 <<= 8
|
||||
length64 |= int64(b)
|
||||
length64 |= uint64(b)
|
||||
}
|
||||
|
||||
// Cast to a platform-specific integer
|
||||
length = int(length64)
|
||||
// Ensure we didn't overflow
|
||||
if int64(length) != length64 {
|
||||
// Ensure we didn't overflow or wrap negative. Length octets are unsigned
|
||||
// (x.600, 8.1.3.5), so a negative result is unrepresentable, not indefinite.
|
||||
if length < 0 || uint64(length) != length64 {
|
||||
return 0, read, errors.New("long-form length overflow")
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -221,6 +221,7 @@ type Router interface {
|
||||
Patch(pattern string, h http.HandlerFunc)
|
||||
Post(pattern string, h http.HandlerFunc)
|
||||
Put(pattern string, h http.HandlerFunc)
|
||||
Query(pattern string, h http.HandlerFunc)
|
||||
Trace(pattern string, h http.HandlerFunc)
|
||||
|
||||
// NotFound defines a handler to respond whenever a route could
|
||||
|
||||
+1
@@ -102,6 +102,7 @@ type Router interface {
|
||||
Patch(pattern string, h http.HandlerFunc)
|
||||
Post(pattern string, h http.HandlerFunc)
|
||||
Put(pattern string, h http.HandlerFunc)
|
||||
Query(pattern string, h http.HandlerFunc)
|
||||
Trace(pattern string, h http.HandlerFunc)
|
||||
|
||||
// NotFound defines a handler to respond whenever a route could
|
||||
|
||||
+2
@@ -23,6 +23,8 @@ var defaultCompressibleContentTypes = []string{
|
||||
"application/json",
|
||||
"application/atom+xml",
|
||||
"application/rss+xml",
|
||||
"application/xml",
|
||||
"text/xml",
|
||||
"image/svg+xml",
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -166,7 +166,7 @@ func (l *defaultLogEntry) Write(status, bytes int, header http.Header, elapsed t
|
||||
}
|
||||
|
||||
func (l *defaultLogEntry) Panic(v interface{}, stack []byte) {
|
||||
PrintPrettyStack(v)
|
||||
printPrettyStack(v, l.useColor)
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
//go:build !tinygo
|
||||
// +build !tinygo
|
||||
|
||||
package middleware
|
||||
|
||||
|
||||
+9
-3
@@ -52,9 +52,16 @@ func Recoverer(next http.Handler) http.Handler {
|
||||
var recovererErrorWriter io.Writer = os.Stderr
|
||||
|
||||
func PrintPrettyStack(rvr interface{}) {
|
||||
printPrettyStack(rvr, true)
|
||||
}
|
||||
|
||||
// printPrettyStack prints a formatted stack trace to stderr. When useColor is
|
||||
// false, ANSI colour codes are suppressed, which is useful for terminals that
|
||||
// do not support them (e.g. on Windows) or when output is being captured.
|
||||
func printPrettyStack(rvr interface{}, useColor bool) {
|
||||
debugStack := debug.Stack()
|
||||
s := prettyStack{}
|
||||
out, err := s.parse(debugStack, rvr)
|
||||
out, err := s.parse(debugStack, rvr, useColor)
|
||||
if err == nil {
|
||||
recovererErrorWriter.Write(out)
|
||||
} else {
|
||||
@@ -66,9 +73,8 @@ func PrintPrettyStack(rvr interface{}) {
|
||||
type prettyStack struct {
|
||||
}
|
||||
|
||||
func (s prettyStack) parse(debugStack []byte, rvr interface{}) ([]byte, error) {
|
||||
func (s prettyStack) parse(debugStack []byte, rvr interface{}, useColor bool) ([]byte, error) {
|
||||
var err error
|
||||
useColor := true
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
cW(buf, false, bRed, "\n")
|
||||
|
||||
+6
-4
@@ -207,10 +207,12 @@ func (f *http2FancyWriter) Push(target string, opts *http.PushOptions) error {
|
||||
}
|
||||
|
||||
func (f *httpFancyWriter) ReadFrom(r io.Reader) (int64, error) {
|
||||
if f.basicWriter.tee != nil {
|
||||
// Route through basicWriter.Write so that data is also written to the
|
||||
// tee writer. basicWriter.Write already increments basicWriter.bytes,
|
||||
// so we must NOT add n again here (that would double-count).
|
||||
if f.basicWriter.tee != nil || f.basicWriter.discard {
|
||||
// Route through basicWriter.Write so that the tee and discard semantics
|
||||
// are honored (the fast ReaderFrom path below would bypass both, writing
|
||||
// straight to the original ResponseWriter). basicWriter.Write already
|
||||
// increments basicWriter.bytes, so we must NOT add n again here (that
|
||||
// would double-count).
|
||||
n, err := io.Copy(&f.basicWriter, r)
|
||||
return n, err
|
||||
}
|
||||
|
||||
+6
@@ -186,6 +186,12 @@ func (mx *Mux) Put(pattern string, handlerFn http.HandlerFunc) {
|
||||
mx.handle(mPUT, pattern, handlerFn)
|
||||
}
|
||||
|
||||
// Query adds the route `pattern` that matches a QUERY http method to
|
||||
// execute the `handlerFn` http.HandlerFunc.
|
||||
func (mx *Mux) Query(pattern string, handlerFn http.HandlerFunc) {
|
||||
mx.handle(mQUERY, pattern, handlerFn)
|
||||
}
|
||||
|
||||
// Trace adds the route `pattern` that matches a TRACE http method to
|
||||
// execute the `handlerFn` http.HandlerFunc.
|
||||
func (mx *Mux) Trace(pattern string, handlerFn http.HandlerFunc) {
|
||||
|
||||
+9
-1
@@ -26,11 +26,17 @@ const (
|
||||
mPATCH
|
||||
mPOST
|
||||
mPUT
|
||||
mQUERY
|
||||
mTRACE
|
||||
)
|
||||
|
||||
var mALL = mCONNECT | mDELETE | mGET | mHEAD |
|
||||
mOPTIONS | mPATCH | mPOST | mPUT | mTRACE
|
||||
mOPTIONS | mPATCH | mPOST | mPUT | mQUERY | mTRACE
|
||||
|
||||
// methodQuery is the HTTP QUERY method (RFC 10008), a safe, idempotent
|
||||
// method that conveys a request body. It is defined here until net/http
|
||||
// provides an equivalent constant, at which point this is a 1-1 swap.
|
||||
const methodQuery = "QUERY"
|
||||
|
||||
var methodMap = map[string]methodTyp{
|
||||
http.MethodConnect: mCONNECT,
|
||||
@@ -41,6 +47,7 @@ var methodMap = map[string]methodTyp{
|
||||
http.MethodPatch: mPATCH,
|
||||
http.MethodPost: mPOST,
|
||||
http.MethodPut: mPUT,
|
||||
methodQuery: mQUERY,
|
||||
http.MethodTrace: mTRACE,
|
||||
}
|
||||
|
||||
@@ -53,6 +60,7 @@ var reverseMethodMap = map[methodTyp]string{
|
||||
mPATCH: http.MethodPatch,
|
||||
mPOST: http.MethodPost,
|
||||
mPUT: http.MethodPut,
|
||||
mQUERY: methodQuery,
|
||||
mTRACE: http.MethodTrace,
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -83,6 +83,9 @@ func (l *Conn) Add(addRequest *AddRequest) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(packet.Children) < 2 {
|
||||
return fmt.Errorf("ldap: malformed response: expected at least 2 children, got %d", len(packet.Children))
|
||||
}
|
||||
if packet.Children[1].Tag == ApplicationAddResponse {
|
||||
err := GetLDAPError(packet)
|
||||
if err != nil {
|
||||
|
||||
+61
-16
@@ -3,13 +3,13 @@ package ldap
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"crypto/rand"
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
enchex "encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"unicode/utf16"
|
||||
|
||||
@@ -221,12 +221,15 @@ func (l *Conn) DigestMD5Bind(digestMD5BindRequest *DigestMD5BindRequest) (*Diges
|
||||
}
|
||||
|
||||
if len(params) > 0 {
|
||||
resp := computeResponse(
|
||||
resp, err := computeResponse(
|
||||
params,
|
||||
"ldap/"+strings.ToLower(digestMD5BindRequest.Host),
|
||||
digestMD5BindRequest.Username,
|
||||
digestMD5BindRequest.Password,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("compute digest-md5 response: %s", err)
|
||||
}
|
||||
packet = ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "LDAP Request")
|
||||
packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, l.nextMessageID(), "MessageID"))
|
||||
|
||||
@@ -291,12 +294,22 @@ func parseParams(str string) (map[string]string, error) {
|
||||
m := make(map[string]string)
|
||||
var key, value string
|
||||
var state int
|
||||
var escaped bool
|
||||
for i := 0; i <= len(str); i++ {
|
||||
switch state {
|
||||
case 0: // reading key
|
||||
if i == len(str) {
|
||||
return nil, fmt.Errorf("syntax error on %d", i)
|
||||
}
|
||||
// The digest-challenge is an RFC 2068 #rule (RFC 2831 section 2.1.1),
|
||||
// which permits optional linear whitespace around the comma directive
|
||||
// separators. Directive names are tokens that never contain
|
||||
// whitespace, so skip it here; otherwise a directive following
|
||||
// "..., name" is keyed with a leading space and the lookups in
|
||||
// computeResponse (realm, nonce, authzid) miss it.
|
||||
if str[i] == ' ' || str[i] == '\t' {
|
||||
continue
|
||||
}
|
||||
if str[i] != '=' {
|
||||
key += string(str[i])
|
||||
continue
|
||||
@@ -307,6 +320,14 @@ func parseParams(str string) (map[string]string, error) {
|
||||
m[key] = value
|
||||
break
|
||||
}
|
||||
// Linear whitespace outside a quoted string is not part of the
|
||||
// value: an unquoted value is a token and a quoted value's content
|
||||
// is read in the quoted state below. Skipping it lets a challenge
|
||||
// using the whitespace the #rule allows (e.g. `nonce="n" , qop=auth`)
|
||||
// parse the same as the unspaced form.
|
||||
if str[i] == ' ' || str[i] == '\t' {
|
||||
continue
|
||||
}
|
||||
switch str[i] {
|
||||
case ',':
|
||||
m[key] = value
|
||||
@@ -325,20 +346,34 @@ func parseParams(str string) (map[string]string, error) {
|
||||
if i == len(str) {
|
||||
return nil, fmt.Errorf("syntax error on %d", i)
|
||||
}
|
||||
if str[i] != '"' {
|
||||
switch {
|
||||
case escaped:
|
||||
// RFC 2831 section 7.1 quoted-pair: a backslash escapes the
|
||||
// following character, so the next byte is taken literally
|
||||
// (this is how a server sends a literal " or \ in a realm or
|
||||
// nonce).
|
||||
value += string(str[i])
|
||||
} else {
|
||||
escaped = false
|
||||
case str[i] == '\\':
|
||||
escaped = true
|
||||
case str[i] == '"':
|
||||
state = 1
|
||||
default:
|
||||
value += string(str[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func computeResponse(params map[string]string, uri, username, password string) string {
|
||||
func computeResponse(params map[string]string, uri, username, password string) (string, error) {
|
||||
nc := "00000001"
|
||||
qop := "auth"
|
||||
cnonce := enchex.EncodeToString(randomBytes(16))
|
||||
rb, err := randomBytes(16)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
cnonce := enchex.EncodeToString(rb)
|
||||
x := username + ":" + params["realm"] + ":" + password
|
||||
y := md5Hash([]byte(x))
|
||||
|
||||
@@ -361,14 +396,24 @@ func computeResponse(params map[string]string, uri, username, password string) s
|
||||
resp := enchex.EncodeToString(md5Hash([]byte(kd)))
|
||||
return fmt.Sprintf(
|
||||
`username="%s",realm="%s",nonce="%s",cnonce="%s",nc=00000001,qop=%s,digest-uri="%s",response=%s`,
|
||||
username,
|
||||
params["realm"],
|
||||
params["nonce"],
|
||||
quotedStringEscape(username),
|
||||
quotedStringEscape(params["realm"]),
|
||||
quotedStringEscape(params["nonce"]),
|
||||
cnonce,
|
||||
qop,
|
||||
uri,
|
||||
quotedStringEscape(uri),
|
||||
resp,
|
||||
)
|
||||
), nil
|
||||
}
|
||||
|
||||
// quotedStringEscape escapes the two characters that may not appear unescaped
|
||||
// inside a DIGEST-MD5 quoted string per RFC 2831 section 7.1: the backslash
|
||||
// and the double quote. The backslash is replaced first so the quotes escaped
|
||||
// afterwards are not doubled.
|
||||
func quotedStringEscape(s string) string {
|
||||
s = strings.ReplaceAll(s, `\`, `\\`)
|
||||
s = strings.ReplaceAll(s, `"`, `\"`)
|
||||
return s
|
||||
}
|
||||
|
||||
func md5Hash(b []byte) []byte {
|
||||
@@ -377,12 +422,12 @@ func md5Hash(b []byte) []byte {
|
||||
return hasher.Sum(nil)
|
||||
}
|
||||
|
||||
func randomBytes(len int) []byte {
|
||||
b := make([]byte, len)
|
||||
for i := 0; i < len; i++ {
|
||||
b[i] = byte(rand.Intn(256))
|
||||
func randomBytes(length int) ([]byte, error) {
|
||||
b := make([]byte, length)
|
||||
if _, err := rand.Read(b); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b
|
||||
return b, nil
|
||||
}
|
||||
|
||||
var externalBindRequest = requestFunc(func(envelope *ber.Packet) error {
|
||||
|
||||
+3
@@ -46,6 +46,9 @@ func (l *Conn) Compare(dn, attribute, value string) (bool, error) {
|
||||
return false, err
|
||||
}
|
||||
|
||||
if len(packet.Children) < 2 {
|
||||
return false, fmt.Errorf("ldap: malformed response: expected at least 2 children, got %d", len(packet.Children))
|
||||
}
|
||||
if packet.Children[1].Tag == ApplicationCompareResponse {
|
||||
err := GetLDAPError(packet)
|
||||
|
||||
|
||||
+55
-11
@@ -8,6 +8,7 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/url"
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
@@ -112,7 +113,11 @@ type Conn struct {
|
||||
outstandingRequests uint
|
||||
messageMutex sync.Mutex
|
||||
|
||||
err error
|
||||
// errMutex guards err only. It is a leaf lock: processMessages and reader
|
||||
// record errors while another goroutine may hold messageMutex, so err must
|
||||
// not share messageMutex or those writers could deadlock.
|
||||
errMutex sync.Mutex
|
||||
err error
|
||||
}
|
||||
|
||||
var _ Client = &Conn{}
|
||||
@@ -160,10 +165,18 @@ type DialContext struct {
|
||||
|
||||
func (dc *DialContext) dial(u *url.URL) (net.Conn, error) {
|
||||
if u.Scheme == "ldapi" {
|
||||
if u.Path == "" || u.Path == "/" {
|
||||
u.Path = "/var/run/slapd/ldapi"
|
||||
// RFC 4516 (and draft-chu-ldap-ldapi) put the socket path in the
|
||||
// host component, percent-encoded; the path is an optional DN.
|
||||
// parseLDAPURL has already decoded the host. Accept the older
|
||||
// ldapi:///path form too so existing callers keep working.
|
||||
path := u.Host
|
||||
if path == "" {
|
||||
path = u.Path
|
||||
}
|
||||
return dc.dialer.Dial("unix", u.Path)
|
||||
if path == "" || path == "/" {
|
||||
path = "/var/run/slapd/ldapi"
|
||||
}
|
||||
return dc.dialer.Dial("unix", path)
|
||||
}
|
||||
|
||||
host, port, err := net.SplitHostPort(u.Host)
|
||||
@@ -222,12 +235,33 @@ func DialTLS(network, addr string, config *tls.Config) (*Conn, error) {
|
||||
return conn, nil
|
||||
}
|
||||
|
||||
// parseLDAPURL parses an LDAP URL. It defers to net/url for the common
|
||||
// ldap/ldaps/cldap schemes, but handles ldapi specially: the spec puts the
|
||||
// unix socket path in the host, percent-encoded with %2F, and net/url rejects
|
||||
// that as invalid. Pull the host out manually and decode it.
|
||||
func parseLDAPURL(addr string) (*url.URL, error) {
|
||||
const ldapi = "ldapi://"
|
||||
if !strings.HasPrefix(addr, ldapi) {
|
||||
return url.Parse(addr)
|
||||
}
|
||||
rest := addr[len(ldapi):]
|
||||
host, path := rest, ""
|
||||
if i := strings.IndexByte(rest, '/'); i >= 0 {
|
||||
host, path = rest[:i], rest[i:]
|
||||
}
|
||||
decodedHost, err := url.PathUnescape(host)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("ldapi: invalid host %q: %w", host, err)
|
||||
}
|
||||
return &url.URL{Scheme: "ldapi", Host: decodedHost, Path: path}, nil
|
||||
}
|
||||
|
||||
// DialURL connects to the given ldap URL.
|
||||
// The following schemas are supported: ldap://, ldaps://, ldapi://,
|
||||
// and cldap:// (RFC1798, deprecated but used by Active Directory).
|
||||
// On success a new Conn for the connection is returned.
|
||||
func DialURL(addr string, opts ...DialOpt) (*Conn, error) {
|
||||
u, err := url.Parse(addr)
|
||||
u, err := parseLDAPURL(addr)
|
||||
if err != nil {
|
||||
return nil, NewError(ErrorNetwork, err)
|
||||
}
|
||||
@@ -338,11 +372,21 @@ func (l *Conn) nextMessageID() int64 {
|
||||
// GetLastError returns the last recorded error from goroutines like processMessages and reader.
|
||||
// Only the last recorded error will be returned.
|
||||
func (l *Conn) GetLastError() error {
|
||||
l.messageMutex.Lock()
|
||||
defer l.messageMutex.Unlock()
|
||||
l.errMutex.Lock()
|
||||
defer l.errMutex.Unlock()
|
||||
return l.err
|
||||
}
|
||||
|
||||
// setError records the connection's last error. The background goroutines that
|
||||
// call it (processMessages, reader, the per-request timeout helper and the
|
||||
// SearchAsync worker) run concurrently with callers of GetLastError, so the
|
||||
// write must take the mutex the getter reads under.
|
||||
func (l *Conn) setError(err error) {
|
||||
l.errMutex.Lock()
|
||||
defer l.errMutex.Unlock()
|
||||
l.err = err
|
||||
}
|
||||
|
||||
// StartTLS sends the command to start a TLS session and then creates a new TLS Client
|
||||
func (l *Conn) StartTLS(config *tls.Config) error {
|
||||
if l.isTLS {
|
||||
@@ -491,7 +535,7 @@ func (l *Conn) sendProcessMessage(message *messagePacket) bool {
|
||||
func (l *Conn) processMessages() {
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
l.err = fmt.Errorf("ldap: recovered panic in processMessages: %v", err)
|
||||
l.setError(fmt.Errorf("ldap: recovered panic in processMessages: %v", err))
|
||||
}
|
||||
for messageID, msgCtx := range l.messageContexts {
|
||||
// If we are closing due to an error, inform anyone who
|
||||
@@ -541,7 +585,7 @@ func (l *Conn) processMessages() {
|
||||
timer := time.NewTimer(time.Duration(requestTimeout))
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
l.err = fmt.Errorf("ldap: recovered panic in RequestTimeout: %v", err)
|
||||
l.setError(fmt.Errorf("ldap: recovered panic in RequestTimeout: %v", err))
|
||||
}
|
||||
|
||||
timer.Stop()
|
||||
@@ -563,7 +607,7 @@ func (l *Conn) processMessages() {
|
||||
if msgCtx, ok := l.messageContexts[message.MessageID]; ok {
|
||||
msgCtx.sendResponse(&PacketResponse{message.Packet, nil}, time.Duration(l.getTimeout()))
|
||||
} else {
|
||||
l.err = fmt.Errorf("ldap: received unexpected message %d, %v", message.MessageID, l.IsClosing())
|
||||
l.setError(fmt.Errorf("ldap: received unexpected message %d, %v", message.MessageID, l.IsClosing()))
|
||||
l.Debug.PrintPacket(message.Packet)
|
||||
}
|
||||
case MessageTimeout:
|
||||
@@ -590,7 +634,7 @@ func (l *Conn) reader() {
|
||||
cleanstop := false
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
l.err = fmt.Errorf("ldap: recovered panic in reader: %v", err)
|
||||
l.setError(fmt.Errorf("ldap: recovered panic in reader: %v", err))
|
||||
}
|
||||
if !cleanstop {
|
||||
l.Close()
|
||||
|
||||
+84
-27
@@ -565,12 +565,20 @@ func DecodeControl(packet *ber.Packet) (Control, error) {
|
||||
case 1:
|
||||
// just type, no criticality or value
|
||||
packet.Children[0].Description = "Control Type (" + ControlTypeMap[ControlType] + ")"
|
||||
ControlType = packet.Children[0].Value.(string)
|
||||
ct, ok := packet.Children[0].Value.(string)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("control type is not a string: %T", packet.Children[0].Value)
|
||||
}
|
||||
ControlType = ct
|
||||
|
||||
case 2:
|
||||
packet.Children[0].Description = "Control Type (" + ControlTypeMap[ControlType] + ")"
|
||||
if packet.Children[0].Value != nil {
|
||||
ControlType = packet.Children[0].Value.(string)
|
||||
ct, ok := packet.Children[0].Value.(string)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("control type is not a string: %T", packet.Children[0].Value)
|
||||
}
|
||||
ControlType = ct
|
||||
} else if packet.Children[0].Data != nil {
|
||||
ControlType = packet.Children[0].Data.String()
|
||||
} else {
|
||||
@@ -579,9 +587,9 @@ func DecodeControl(packet *ber.Packet) (Control, error) {
|
||||
|
||||
// Children[1] could be criticality or value (both are optional)
|
||||
// duck-type on whether this is a boolean
|
||||
if _, ok := packet.Children[1].Value.(bool); ok {
|
||||
if crit, ok := packet.Children[1].Value.(bool); ok {
|
||||
packet.Children[1].Description = "Criticality"
|
||||
Criticality = packet.Children[1].Value.(bool)
|
||||
Criticality = crit
|
||||
} else {
|
||||
packet.Children[1].Description = "Control Value"
|
||||
value = packet.Children[1]
|
||||
@@ -589,10 +597,18 @@ func DecodeControl(packet *ber.Packet) (Control, error) {
|
||||
|
||||
case 3:
|
||||
packet.Children[0].Description = "Control Type (" + ControlTypeMap[ControlType] + ")"
|
||||
ControlType = packet.Children[0].Value.(string)
|
||||
ct, ok := packet.Children[0].Value.(string)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("control type is not a string: %T", packet.Children[0].Value)
|
||||
}
|
||||
ControlType = ct
|
||||
|
||||
packet.Children[1].Description = "Criticality"
|
||||
Criticality = packet.Children[1].Value.(bool)
|
||||
crit, ok := packet.Children[1].Value.(bool)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("criticality is not a bool: %T", packet.Children[1].Value)
|
||||
}
|
||||
Criticality = crit
|
||||
|
||||
packet.Children[2].Description = "Control Value"
|
||||
value = packet.Children[2]
|
||||
@@ -606,6 +622,9 @@ func DecodeControl(packet *ber.Packet) (Control, error) {
|
||||
case ControlTypeManageDsaIT:
|
||||
return NewControlManageDsaIT(Criticality), nil
|
||||
case ControlTypePaging:
|
||||
if value == nil {
|
||||
return nil, fmt.Errorf("paging control value is missing")
|
||||
}
|
||||
value.Description += " (Paging)"
|
||||
c := new(ControlPaging)
|
||||
if value.Value != nil {
|
||||
@@ -617,11 +636,21 @@ func DecodeControl(packet *ber.Packet) (Control, error) {
|
||||
value.Value = nil
|
||||
value.AppendChild(valueChildren)
|
||||
}
|
||||
if len(value.Children) == 0 {
|
||||
return nil, fmt.Errorf("paging control value is empty")
|
||||
}
|
||||
value = value.Children[0]
|
||||
value.Description = "Search Control Value"
|
||||
if len(value.Children) < 2 {
|
||||
return nil, fmt.Errorf("paging control value has %d children, expected 2", len(value.Children))
|
||||
}
|
||||
value.Children[0].Description = "Paging Size"
|
||||
value.Children[1].Description = "Cookie"
|
||||
c.PagingSize = uint32(value.Children[0].Value.(int64))
|
||||
pagingSize, ok := value.Children[0].Value.(int64)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("paging size is not an integer: %T", value.Children[0].Value)
|
||||
}
|
||||
c.PagingSize = uint32(pagingSize)
|
||||
c.Cookie = value.Children[1].Data.Bytes()
|
||||
value.Children[1].Value = c.Cookie
|
||||
return c, nil
|
||||
@@ -729,7 +758,16 @@ func DecodeControl(packet *ber.Packet) (Control, error) {
|
||||
c.ControlType = ControlType
|
||||
c.Criticality = Criticality
|
||||
if value != nil {
|
||||
c.ControlValue = value.Value.(string)
|
||||
// A non-conforming or malicious server can send a non-string
|
||||
// (or nil) value here; the previous unchecked cast panicked
|
||||
// the calling goroutine, see #561. Fall back to the raw bytes
|
||||
// when the value isn't a string so we surface an error
|
||||
// instead of crashing.
|
||||
if s, ok := value.Value.(string); ok {
|
||||
c.ControlValue = s
|
||||
} else if value.Data != nil {
|
||||
c.ControlValue = value.Data.String()
|
||||
}
|
||||
}
|
||||
return c, nil
|
||||
}
|
||||
@@ -921,28 +959,44 @@ func (c *ControlServerSideSorting) GetControlType() string {
|
||||
}
|
||||
|
||||
func NewControlServerSideSorting(value *ber.Packet) (*ControlServerSideSorting, error) {
|
||||
sortKeys := []*SortKey{}
|
||||
val, err := ber.DecodePacketErr(value.Data.Bytes())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("decode packet err: %s", err)
|
||||
}
|
||||
|
||||
val := value.Children[1].Children
|
||||
|
||||
if len(val) != 1 {
|
||||
if len(val.Children) == 0 {
|
||||
return nil, fmt.Errorf("no sequence value in packet")
|
||||
}
|
||||
|
||||
sequences := val[0].Children
|
||||
var sortKeys []*SortKey
|
||||
|
||||
for i, sequence := range sequences {
|
||||
sortKey := new(SortKey)
|
||||
|
||||
if len(sequence.Children) < 2 {
|
||||
return nil, fmt.Errorf("attributeType or matchingRule is missing from sequence %d", i)
|
||||
for i, sequence := range val.Children {
|
||||
if len(sequence.Children) < 1 || len(sequence.Children) > 3 {
|
||||
return nil, fmt.Errorf("attributeType is missing from sequence %d", i)
|
||||
}
|
||||
|
||||
sortKey.AttributeType = sequence.Children[0].Value.(string)
|
||||
sortKey.MatchingRule = sequence.Children[1].Value.(string)
|
||||
sortKey := new(SortKey)
|
||||
|
||||
if len(sequence.Children) == 3 {
|
||||
sortKey.Reverse = sequence.Children[2].Value.(bool)
|
||||
for _, child := range sequence.Children {
|
||||
switch {
|
||||
case child.ClassType == ber.ClassUniversal && child.Tag == ber.TagOctetString:
|
||||
// A constructed-form OCTET STRING matches this case but leaves
|
||||
// Value nil; guard the assertion so a malformed attributeType is
|
||||
// rejected below rather than panicking.
|
||||
if attrType, ok := child.Value.(string); ok {
|
||||
sortKey.AttributeType = attrType
|
||||
}
|
||||
|
||||
case child.ClassType == ber.ClassContext && child.Tag == 0:
|
||||
sortKey.MatchingRule = child.Data.String()
|
||||
|
||||
case child.ClassType == ber.ClassContext && child.Tag == 1:
|
||||
b := child.Data.Bytes()
|
||||
sortKey.Reverse = len(b) > 0 && b[0] != 0
|
||||
}
|
||||
}
|
||||
if sortKey.AttributeType == "" {
|
||||
return nil, fmt.Errorf("attributeType is missing from sequence %d", i)
|
||||
}
|
||||
|
||||
sortKeys = append(sortKeys, sortKey)
|
||||
@@ -959,7 +1013,6 @@ func (c *ControlServerSideSorting) Encode() *ber.Packet {
|
||||
packet := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "Control")
|
||||
control := ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, c.GetControlType(), "Control Type")
|
||||
|
||||
value := ber.Encode(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, nil, "Control Value")
|
||||
seqs := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "SortKeyList")
|
||||
|
||||
for _, f := range c.SortKeys {
|
||||
@@ -968,9 +1021,11 @@ func (c *ControlServerSideSorting) Encode() *ber.Packet {
|
||||
seq.AppendChild(
|
||||
ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, f.AttributeType, "attributeType"),
|
||||
)
|
||||
seq.AppendChild(
|
||||
ber.NewString(ber.ClassContext, ber.TypePrimitive, 0, f.MatchingRule, "orderingRule"),
|
||||
)
|
||||
if f.MatchingRule != "" {
|
||||
seq.AppendChild(
|
||||
ber.NewString(ber.ClassContext, ber.TypePrimitive, 0, f.MatchingRule, "orderingRule"),
|
||||
)
|
||||
}
|
||||
if f.Reverse {
|
||||
seq.AppendChild(
|
||||
ber.NewBoolean(ber.ClassContext, ber.TypePrimitive, 1, f.Reverse, "reverseOrder"),
|
||||
@@ -980,7 +1035,7 @@ func (c *ControlServerSideSorting) Encode() *ber.Packet {
|
||||
seqs.AppendChild(seq)
|
||||
}
|
||||
|
||||
value.AppendChild(seqs)
|
||||
value := ber.Encode(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, string(seqs.Bytes()), "Control Value")
|
||||
|
||||
packet.AppendChild(control)
|
||||
packet.AppendChild(value)
|
||||
@@ -1060,6 +1115,8 @@ func NewControlServerSideSortingResult(pkt *ber.Packet) (*ControlServerSideSorti
|
||||
return nil, err
|
||||
}
|
||||
|
||||
control.Result = ControlServerSideSortingCode(codeInt)
|
||||
|
||||
return control, nil
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -52,6 +52,9 @@ func (l *Conn) Del(delRequest *DelRequest) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(packet.Children) < 2 {
|
||||
return fmt.Errorf("ldap: malformed response: expected at least 2 children, got %d", len(packet.Children))
|
||||
}
|
||||
if packet.Children[1].Tag == ApplicationDelResponse {
|
||||
err := GetLDAPError(packet)
|
||||
if err != nil {
|
||||
|
||||
+54
-7
@@ -1,14 +1,16 @@
|
||||
package ldap
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
ber "github.com/go-asn1-ber/asn1-ber"
|
||||
"sort"
|
||||
"strings"
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
|
||||
ber "github.com/go-asn1-ber/asn1-ber"
|
||||
)
|
||||
|
||||
// AttributeTypeAndValue represents an attributeTypeAndValue from https://tools.ietf.org/html/rfc4514
|
||||
@@ -94,9 +96,21 @@ func (d *DN) String() string {
|
||||
func stripLeadingAndTrailingSpaces(inVal string) string {
|
||||
noSpaces := strings.Trim(inVal, " ")
|
||||
|
||||
// Re-add the trailing space if it was an escaped space
|
||||
if len(noSpaces) > 0 && noSpaces[len(noSpaces)-1] == '\\' && inVal[len(inVal)-1] == ' ' {
|
||||
noSpaces = noSpaces + " "
|
||||
// Re-add the trailing space only if it was escaped. A trailing space is
|
||||
// escaped when it is preceded by an odd number of backslashes; an even
|
||||
// number leaves the space unescaped (each "\\" is a literal backslash), so
|
||||
// the space is insignificant and stays stripped. Counting only the final
|
||||
// backslash treated "\\ " (a literal backslash plus an insignificant
|
||||
// space) as an escaped space, keeping a spurious trailing space in the
|
||||
// decoded value.
|
||||
if len(noSpaces) > 0 && inVal[len(inVal)-1] == ' ' {
|
||||
backslashes := 0
|
||||
for i := len(noSpaces) - 1; i >= 0 && noSpaces[i] == '\\'; i-- {
|
||||
backslashes++
|
||||
}
|
||||
if backslashes%2 == 1 {
|
||||
noSpaces = noSpaces + " "
|
||||
}
|
||||
}
|
||||
|
||||
return noSpaces
|
||||
@@ -116,6 +130,16 @@ func decodeString(str string) (string, error) {
|
||||
// If the character is not an escape character, just add it to the
|
||||
// builder and continue
|
||||
if char != '\\' {
|
||||
// RFC 4514 section 2.4: these characters must appear escaped
|
||||
// (either as "\X" or as "\XX" hex) when present in an AttributeValue.
|
||||
// Reject the raw form here so that callers don't silently accept
|
||||
// input that violates the grammar.
|
||||
switch char {
|
||||
case '"', ';', '<', '>':
|
||||
return "", fmt.Errorf("got unescaped character: '%s'", string(char))
|
||||
case 0:
|
||||
return "", fmt.Errorf("got unescaped NULL character")
|
||||
}
|
||||
builder.WriteRune(char)
|
||||
continue
|
||||
}
|
||||
@@ -233,10 +257,18 @@ func decodeEncodedString(str string) (string, error) {
|
||||
return "", fmt.Errorf("failed to decode BER encoding: %w", err)
|
||||
}
|
||||
|
||||
packet, err := ber.DecodePacketErr(decoded)
|
||||
// RFC 4514 section 2.4: the value following '#' is the hex encoding of the
|
||||
// BER encoding of a single AttributeValue. Read exactly one element and
|
||||
// reject any leftover octets, otherwise bytes appended after the value are
|
||||
// silently dropped and two different DN strings decode to the same value.
|
||||
reader := bytes.NewBuffer(decoded)
|
||||
packet, err := ber.ReadPacket(reader)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to decode BER encoding: %w", err)
|
||||
}
|
||||
if reader.Len() != 0 {
|
||||
return "", errors.New("failed to decode BER encoding: trailing bytes after value")
|
||||
}
|
||||
|
||||
return packet.Data.String(), nil
|
||||
}
|
||||
@@ -352,10 +384,19 @@ func (r *RelativeDN) Equal(other *RelativeDN) bool {
|
||||
}
|
||||
|
||||
func (r *RelativeDN) hasAllAttributes(attrs []*AttributeTypeAndValue) bool {
|
||||
// Each candidate attribute must match a distinct attribute of the receiver.
|
||||
// Without consuming matches this is a set containment test, so a multi-valued
|
||||
// RDN that repeats an attributeTypeAndValue would compare equal to one that
|
||||
// repeats a different pair the same number of times.
|
||||
matched := make([]bool, len(r.Attributes))
|
||||
for _, attr := range attrs {
|
||||
found := false
|
||||
for _, myattr := range r.Attributes {
|
||||
for i, myattr := range r.Attributes {
|
||||
if matched[i] {
|
||||
continue
|
||||
}
|
||||
if myattr.Equal(attr) {
|
||||
matched[i] = true
|
||||
found = true
|
||||
break
|
||||
}
|
||||
@@ -415,10 +456,16 @@ func (r *RelativeDN) EqualFold(other *RelativeDN) bool {
|
||||
}
|
||||
|
||||
func (r *RelativeDN) hasAllAttributesFold(attrs []*AttributeTypeAndValue) bool {
|
||||
// See hasAllAttributes: matches are consumed so multiplicity is respected.
|
||||
matched := make([]bool, len(r.Attributes))
|
||||
for _, attr := range attrs {
|
||||
found := false
|
||||
for _, myattr := range r.Attributes {
|
||||
for i, myattr := range r.Attributes {
|
||||
if matched[i] {
|
||||
continue
|
||||
}
|
||||
if myattr.EqualFold(attr) {
|
||||
matched[i] = true
|
||||
found = true
|
||||
break
|
||||
}
|
||||
|
||||
+8
@@ -89,6 +89,14 @@ func (l *Conn) Extended(er *ExtendedRequest) (*ExtendedResponse, error) {
|
||||
}
|
||||
|
||||
for _, child := range extResp.Children {
|
||||
// responseName [10] and responseValue [11] are context-class and
|
||||
// optional. The preceding resultCode is a universal ENUMERATED whose
|
||||
// tag number (10) is the same as responseName, so a child must be
|
||||
// matched on its class as well, otherwise the resultCode is read as
|
||||
// the responseName whenever the server omits the latter.
|
||||
if child.ClassType != ber.ClassContext {
|
||||
continue
|
||||
}
|
||||
switch child.Tag {
|
||||
case ber.TagEnumerated:
|
||||
response.Name = child.Data.String()
|
||||
|
||||
+8
-8
@@ -131,7 +131,7 @@ func DecompileFilter(packet *ber.Packet) (_ string, err error) {
|
||||
buf.WriteString(childStr)
|
||||
|
||||
case FilterSubstrings:
|
||||
buf.WriteString(ber.DecodeString(packet.Children[0].Data.Bytes()))
|
||||
buf.WriteString(EscapeFilter(ber.DecodeString(packet.Children[0].Data.Bytes())))
|
||||
buf.WriteByte('=')
|
||||
for i, child := range packet.Children[1].Children {
|
||||
if i == 0 && child.Tag != FilterSubstringsInitial {
|
||||
@@ -143,22 +143,22 @@ func DecompileFilter(packet *ber.Packet) (_ string, err error) {
|
||||
}
|
||||
}
|
||||
case FilterEqualityMatch:
|
||||
buf.WriteString(ber.DecodeString(packet.Children[0].Data.Bytes()))
|
||||
buf.WriteString(EscapeFilter(ber.DecodeString(packet.Children[0].Data.Bytes())))
|
||||
buf.WriteByte('=')
|
||||
buf.WriteString(EscapeFilter(ber.DecodeString(packet.Children[1].Data.Bytes())))
|
||||
case FilterGreaterOrEqual:
|
||||
buf.WriteString(ber.DecodeString(packet.Children[0].Data.Bytes()))
|
||||
buf.WriteString(EscapeFilter(ber.DecodeString(packet.Children[0].Data.Bytes())))
|
||||
buf.WriteString(">=")
|
||||
buf.WriteString(EscapeFilter(ber.DecodeString(packet.Children[1].Data.Bytes())))
|
||||
case FilterLessOrEqual:
|
||||
buf.WriteString(ber.DecodeString(packet.Children[0].Data.Bytes()))
|
||||
buf.WriteString(EscapeFilter(ber.DecodeString(packet.Children[0].Data.Bytes())))
|
||||
buf.WriteString("<=")
|
||||
buf.WriteString(EscapeFilter(ber.DecodeString(packet.Children[1].Data.Bytes())))
|
||||
case FilterPresent:
|
||||
buf.WriteString(ber.DecodeString(packet.Data.Bytes()))
|
||||
buf.WriteString(EscapeFilter(ber.DecodeString(packet.Data.Bytes())))
|
||||
buf.WriteString("=*")
|
||||
case FilterApproxMatch:
|
||||
buf.WriteString(ber.DecodeString(packet.Children[0].Data.Bytes()))
|
||||
buf.WriteString(EscapeFilter(ber.DecodeString(packet.Children[0].Data.Bytes())))
|
||||
buf.WriteString("~=")
|
||||
buf.WriteString(EscapeFilter(ber.DecodeString(packet.Children[1].Data.Bytes())))
|
||||
case FilterExtensibleMatch:
|
||||
@@ -181,14 +181,14 @@ func DecompileFilter(packet *ber.Packet) (_ string, err error) {
|
||||
}
|
||||
|
||||
if len(attr) > 0 {
|
||||
buf.WriteString(attr)
|
||||
buf.WriteString(EscapeFilter(attr))
|
||||
}
|
||||
if dnAttributes {
|
||||
buf.WriteString(":dn")
|
||||
}
|
||||
if len(matchingRule) > 0 {
|
||||
buf.WriteString(":")
|
||||
buf.WriteString(matchingRule)
|
||||
buf.WriteString(EscapeFilter(matchingRule))
|
||||
}
|
||||
buf.WriteString(":=")
|
||||
buf.WriteString(EscapeFilter(value))
|
||||
|
||||
+3
@@ -89,6 +89,9 @@ func (l *Conn) ModifyDN(m *ModifyDNRequest) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(packet.Children) < 2 {
|
||||
return fmt.Errorf("ldap: malformed response: expected at least 2 children, got %d", len(packet.Children))
|
||||
}
|
||||
if packet.Children[1].Tag == ApplicationModifyDNResponse {
|
||||
err := GetLDAPError(packet)
|
||||
if err != nil {
|
||||
|
||||
+7
@@ -121,6 +121,9 @@ func (l *Conn) Modify(modifyRequest *ModifyRequest) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(packet.Children) < 2 {
|
||||
return fmt.Errorf("ldap: malformed response: expected at least 2 children, got %d", len(packet.Children))
|
||||
}
|
||||
if packet.Children[1].Tag == ApplicationModifyResponse {
|
||||
err := GetLDAPError(packet)
|
||||
if err != nil {
|
||||
@@ -159,6 +162,10 @@ func (l *Conn) ModifyWithResult(modifyRequest *ModifyRequest) (*ModifyResult, er
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(packet.Children) < 2 {
|
||||
return nil, fmt.Errorf("ldap: malformed response: expected at least 2 children, got %d", len(packet.Children))
|
||||
}
|
||||
|
||||
switch packet.Children[1].Tag {
|
||||
case ApplicationModifyResponse:
|
||||
if err = GetLDAPError(packet); err != nil {
|
||||
|
||||
+7
-1
@@ -93,6 +93,9 @@ func (l *Conn) PasswordModify(passwordModifyRequest *PasswordModifyRequest) (*Pa
|
||||
|
||||
result := &PasswordModifyResult{}
|
||||
|
||||
if len(packet.Children) < 2 {
|
||||
return nil, fmt.Errorf("ldap: malformed response: expected at least 2 children, got %d", len(packet.Children))
|
||||
}
|
||||
if packet.Children[1].Tag == ApplicationExtendedResponse {
|
||||
if err = GetLDAPError(packet); err != nil {
|
||||
result.Referral = getReferral(err, packet)
|
||||
@@ -106,7 +109,10 @@ func (l *Conn) PasswordModify(passwordModifyRequest *PasswordModifyRequest) (*Pa
|
||||
extendedResponse := packet.Children[1]
|
||||
for _, child := range extendedResponse.Children {
|
||||
if child.Tag == ber.TagEmbeddedPDV {
|
||||
passwordModifyResponseValue := ber.DecodePacket(child.Data.Bytes())
|
||||
passwordModifyResponseValue, err := ber.DecodePacketErr(child.Data.Bytes())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("ldap: failed to decode PasswordModifyResponseValue: %s", err)
|
||||
}
|
||||
if len(passwordModifyResponseValue.Children) == 1 {
|
||||
if passwordModifyResponseValue.Children[0].Tag == ber.TagEOC {
|
||||
result.GeneratedPassword = ber.DecodeString(passwordModifyResponseValue.Children[0].Data.Bytes())
|
||||
|
||||
+8
@@ -101,6 +101,14 @@ func getReferral(err error, packet *ber.Packet) (referral string) {
|
||||
continue
|
||||
}
|
||||
|
||||
// A Referral is a SEQUENCE SIZE (1..MAX) OF uri, but a non-conforming or
|
||||
// malicious server can send an empty SEQUENCE. Skip it instead of indexing
|
||||
// child.Children[0], which would panic the goroutine that called Modify or
|
||||
// PasswordModify.
|
||||
if len(child.Children) == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
if referral, ok = child.Children[0].Value.(string); ok {
|
||||
return referral
|
||||
}
|
||||
|
||||
+40
-16
@@ -66,12 +66,28 @@ func (r *searchResponse) Next() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// send enqueues a result on the result channel, giving up when ctx is
|
||||
// cancelled so an abandoned consumer cannot block the search goroutine
|
||||
// forever on a full buffer. It reports whether the result was handed off to
|
||||
// the channel; a true return does not mean the consumer received it. The
|
||||
// give-up is best-effort: if ctx is already cancelled but buffer space is
|
||||
// available, the result may still be enqueued. Callers that terminate the
|
||||
// stream regardless of the outcome may ignore the return value.
|
||||
func (r *searchResponse) send(ctx context.Context, res *SearchSingleResult) bool {
|
||||
select {
|
||||
case r.ch <- res:
|
||||
return true
|
||||
case <-ctx.Done():
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func (r *searchResponse) start(ctx context.Context, searchRequest *SearchRequest) {
|
||||
go func() {
|
||||
defer func() {
|
||||
close(r.ch)
|
||||
if err := recover(); err != nil {
|
||||
r.conn.err = fmt.Errorf("ldap: recovered panic in searchResponse: %v", err)
|
||||
r.conn.setError(fmt.Errorf("ldap: recovered panic in searchResponse: %v", err))
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -84,14 +100,14 @@ func (r *searchResponse) start(ctx context.Context, searchRequest *SearchRequest
|
||||
// encode search request
|
||||
err := searchRequest.appendTo(packet)
|
||||
if err != nil {
|
||||
r.ch <- &SearchSingleResult{Error: err}
|
||||
r.send(ctx, &SearchSingleResult{Error: err})
|
||||
return
|
||||
}
|
||||
r.conn.Debug.PrintPacket(packet)
|
||||
|
||||
msgCtx, err := r.conn.sendMessage(packet)
|
||||
if err != nil {
|
||||
r.ch <- &SearchSingleResult{Error: err}
|
||||
r.send(ctx, &SearchSingleResult{Error: err})
|
||||
return
|
||||
}
|
||||
defer r.conn.finishMessage(msgCtx)
|
||||
@@ -106,19 +122,19 @@ func (r *searchResponse) start(ctx context.Context, searchRequest *SearchRequest
|
||||
case packetResponse, ok := <-msgCtx.responses:
|
||||
if !ok {
|
||||
err := NewError(ErrorNetwork, errors.New("ldap: response channel closed"))
|
||||
r.ch <- &SearchSingleResult{Error: err}
|
||||
r.send(ctx, &SearchSingleResult{Error: err})
|
||||
return
|
||||
}
|
||||
packet, err = packetResponse.ReadPacket()
|
||||
r.conn.Debug.Printf("%d: got response %p", msgCtx.id, packet)
|
||||
if err != nil {
|
||||
r.ch <- &SearchSingleResult{Error: err}
|
||||
r.send(ctx, &SearchSingleResult{Error: err})
|
||||
return
|
||||
}
|
||||
|
||||
if r.conn.Debug {
|
||||
if err := addLDAPDescriptions(packet); err != nil {
|
||||
r.ch <- &SearchSingleResult{Error: err}
|
||||
r.send(ctx, &SearchSingleResult{Error: err})
|
||||
return
|
||||
}
|
||||
ber.PrintPacket(packet)
|
||||
@@ -133,22 +149,26 @@ func (r *searchResponse) start(ctx context.Context, searchRequest *SearchRequest
|
||||
},
|
||||
}
|
||||
if len(packet.Children) != 3 {
|
||||
r.ch <- result
|
||||
if !r.send(ctx, result) {
|
||||
return
|
||||
}
|
||||
continue
|
||||
}
|
||||
decoded, err := DecodeControl(packet.Children[2].Children[0])
|
||||
if err != nil {
|
||||
werr := fmt.Errorf("failed to decode search result entry: %w", err)
|
||||
result.Error = werr
|
||||
r.ch <- result
|
||||
r.send(ctx, result)
|
||||
return
|
||||
}
|
||||
result.Controls = append(result.Controls, decoded)
|
||||
r.ch <- result
|
||||
if !r.send(ctx, result) {
|
||||
return
|
||||
}
|
||||
|
||||
case ApplicationSearchResultDone:
|
||||
if err := GetLDAPError(packet); err != nil {
|
||||
r.ch <- &SearchSingleResult{Error: err}
|
||||
r.send(ctx, &SearchSingleResult{Error: err})
|
||||
return
|
||||
}
|
||||
if len(packet.Children) == 3 {
|
||||
@@ -157,33 +177,37 @@ func (r *searchResponse) start(ctx context.Context, searchRequest *SearchRequest
|
||||
decodedChild, err := DecodeControl(child)
|
||||
if err != nil {
|
||||
werr := fmt.Errorf("failed to decode child control: %w", err)
|
||||
r.ch <- &SearchSingleResult{Error: werr}
|
||||
r.send(ctx, &SearchSingleResult{Error: werr})
|
||||
return
|
||||
}
|
||||
result.Controls = append(result.Controls, decodedChild)
|
||||
}
|
||||
r.ch <- result
|
||||
r.send(ctx, result)
|
||||
}
|
||||
foundSearchSingleResultDone = true
|
||||
|
||||
case ApplicationSearchResultReference:
|
||||
ref := packet.Children[1].Children[0].Value.(string)
|
||||
r.ch <- &SearchSingleResult{Referral: ref}
|
||||
if !r.send(ctx, &SearchSingleResult{Referral: ref}) {
|
||||
return
|
||||
}
|
||||
|
||||
case ApplicationIntermediateResponse:
|
||||
decoded, err := DecodeControl(packet.Children[1])
|
||||
if err != nil {
|
||||
werr := fmt.Errorf("failed to decode intermediate response: %w", err)
|
||||
r.ch <- &SearchSingleResult{Error: werr}
|
||||
r.send(ctx, &SearchSingleResult{Error: werr})
|
||||
return
|
||||
}
|
||||
result := &SearchSingleResult{}
|
||||
result.Controls = append(result.Controls, decoded)
|
||||
r.ch <- result
|
||||
if !r.send(ctx, result) {
|
||||
return
|
||||
}
|
||||
|
||||
default:
|
||||
err := fmt.Errorf("unknown tag: %d", packet.Children[1].Tag)
|
||||
r.ch <- &SearchSingleResult{Error: err}
|
||||
r.send(ctx, &SearchSingleResult{Error: err})
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
+6
-2
@@ -624,7 +624,10 @@ func (l *Conn) Search(searchRequest *SearchRequest) (*SearchResult, error) {
|
||||
// SearchAsync performs a search request and returns all search results asynchronously.
|
||||
// This means you get all results until an error happens (or the search successfully finished),
|
||||
// e.g. for size / time limited requests all are received until the limit is reached.
|
||||
// To stop the search, call cancel function of the context.
|
||||
// To stop the search, call the cancel function of the context; Next may
|
||||
// still deliver a few results received before the cancellation took effect.
|
||||
// Cancellation is not reported as an error: Err returns nil, same as a
|
||||
// successfully completed search.
|
||||
func (l *Conn) SearchAsync(
|
||||
ctx context.Context, searchRequest *SearchRequest, bufferSize int) Response {
|
||||
r := newSearchResponse(l, bufferSize)
|
||||
@@ -635,7 +638,8 @@ func (l *Conn) SearchAsync(
|
||||
// Syncrepl is a short name for LDAP Sync Replication engine that works on the
|
||||
// consumer-side. This can perform a persistent search and returns an entry
|
||||
// when the entry is updated on the server side.
|
||||
// To stop the search, call cancel function of the context.
|
||||
// To stop the search, call the cancel function of the context; cancellation
|
||||
// is not reported as an error, Err returns nil.
|
||||
func (l *Conn) Syncrepl(
|
||||
ctx context.Context, searchRequest *SearchRequest, bufferSize int,
|
||||
mode ControlSyncRequestMode, cookie []byte, reloadHint bool,
|
||||
|
||||
+8
-1
@@ -24,11 +24,18 @@ func (l *Conn) Unbind() error {
|
||||
return ErrConnUnbound
|
||||
}
|
||||
|
||||
_, err := l.doRequest(unbindRequest{})
|
||||
msgCtx, err := l.doRequest(unbindRequest{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Finish the message context so its done channel is closed. Without
|
||||
// this, a server-initiated disconnect racing with Close can deadlock:
|
||||
// processMessages cleanup tries to deliver closeErr to the orphaned
|
||||
// context via sendResponse, which blocks forever on the unclosed done
|
||||
// channel, preventing chanConfirm from being signalled.
|
||||
l.finishMessage(msgCtx)
|
||||
|
||||
// Sending an unbindRequest will make the connection unusable.
|
||||
// Pending requests will fail with:
|
||||
// LDAP Result Code 200 "Network Error": ldap: response channel closed
|
||||
|
||||
+7
-1
@@ -19,5 +19,11 @@ func (l *Conn) WhoAmI(controls []Control) (*WhoAmIResult, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &WhoAmIResult{AuthzID: resp.Value.Data.String()}, nil
|
||||
// responseValue is OPTIONAL (RFC 4532); Extended leaves Value nil when the
|
||||
// server omits it. Guard the dereference and report an empty authzId.
|
||||
result := &WhoAmIResult{}
|
||||
if resp.Value != nil {
|
||||
result.AuthzID = resp.Value.Data.String()
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
+1
-1
@@ -5,7 +5,7 @@ import os
|
||||
import subprocess
|
||||
|
||||
|
||||
VERSION = "1.8.22"
|
||||
VERSION = "1.8.23"
|
||||
|
||||
|
||||
def run(*args: str):
|
||||
|
||||
+30
-6
@@ -5,6 +5,7 @@
|
||||
package webp
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"errors"
|
||||
"image"
|
||||
@@ -123,16 +124,39 @@ func decode(r io.Reader, configOnly bool) (image.Image, image.Config, error) {
|
||||
c, err := vp8l.DecodeConfig(chunkData)
|
||||
return nil, c, err
|
||||
}
|
||||
if seenVP8X {
|
||||
// Verify the VP8L chunk dimensions match before
|
||||
// calling vp8l.Decode, to catch malicious images
|
||||
// following a small VP8X header with a huge VP8L chunk.
|
||||
//
|
||||
// Peek the VP8L header.
|
||||
//
|
||||
// chunkData is always an unbuffered riff.chunkReader.
|
||||
// Creating a bufio.Reader here doesn't add any
|
||||
// inefficiency, since the vp8l package will do it
|
||||
// if we don't.
|
||||
bufReader := bufio.NewReader(chunkData)
|
||||
chunkData = bufReader
|
||||
const vp8lHeaderSize = 5
|
||||
vp8lHeader, err := bufReader.Peek(vp8lHeaderSize)
|
||||
if err != nil {
|
||||
if err == io.EOF {
|
||||
err = errInvalidFormat
|
||||
}
|
||||
return nil, image.Config{}, err
|
||||
}
|
||||
c, err := vp8l.DecodeConfig(bytes.NewReader(vp8lHeader))
|
||||
if err != nil {
|
||||
return nil, image.Config{}, err
|
||||
}
|
||||
if c.Width != int(widthMinusOne)+1 || c.Height != int(heightMinusOne)+1 {
|
||||
return nil, image.Config{}, errInvalidFormat
|
||||
}
|
||||
}
|
||||
m, err := vp8l.Decode(chunkData)
|
||||
if err != nil {
|
||||
return nil, image.Config{}, err
|
||||
}
|
||||
if seenVP8X {
|
||||
bounds := m.Bounds()
|
||||
if bounds.Dx() != int(widthMinusOne)+1 || bounds.Dy() != int(heightMinusOne)+1 {
|
||||
return nil, image.Config{}, errInvalidFormat
|
||||
}
|
||||
}
|
||||
return m, image.Config{}, nil
|
||||
case fccVP8X:
|
||||
if seenVP8X {
|
||||
|
||||
+18
-17
@@ -17,8 +17,8 @@
|
||||
// It uses data-independent memory access, which is preferred for password
|
||||
// hashing and password-based key derivation. Argon2i requires more passes over
|
||||
// memory than Argon2id to protect from trade-off attacks. The recommended
|
||||
// parameters (taken from [RFC 9106 Section 7.3]) for non-interactive operations are time=3 and to
|
||||
// use the maximum available memory.
|
||||
// parameters (taken from [RFC 9106 Section 7.3]) for non-interactive
|
||||
// operations are time=3 and to use the maximum available memory.
|
||||
//
|
||||
// # Argon2id
|
||||
//
|
||||
@@ -26,11 +26,14 @@
|
||||
// Argon2i and Argon2d. It uses data-independent memory access for the first
|
||||
// half of the first iteration over the memory and data-dependent memory access
|
||||
// for the rest. Argon2id is side-channel resistant and provides better brute-
|
||||
// force cost savings due to time-memory tradeoffs than Argon2i. The recommended
|
||||
// parameters for non-interactive operations (taken from [RFC 9106 Section 7.3]) are time=1 and to
|
||||
// use the maximum available memory.
|
||||
// force cost savings due to time-memory tradeoffs than Argon2i. [RFC 9106
|
||||
// Section 4] recommends time=1, memory=2*1024*1024 KiB (2 GiB), and threads=4
|
||||
// as the first recommended option. If much less memory is available, it
|
||||
// recommends time=3, memory=64*1024 KiB (64 MiB), and threads=4 as the second
|
||||
// recommended option.
|
||||
//
|
||||
// [argon2-specs.pdf]: https://github.com/P-H-C/phc-winner-argon2/blob/master/argon2-specs.pdf
|
||||
// [RFC 9106 Section 4]: https://www.rfc-editor.org/rfc/rfc9106.html#section-4
|
||||
// [RFC 9106 Section 7.3]: https://www.rfc-editor.org/rfc/rfc9106.html#section-7.3
|
||||
package argon2
|
||||
|
||||
@@ -59,9 +62,9 @@ const (
|
||||
//
|
||||
// key := argon2.Key([]byte("some password"), salt, 3, 32*1024, 4, 32)
|
||||
//
|
||||
// [RFC 9106 Section 7.3] recommends time=3, and memory=32*1024 as a sensible number.
|
||||
// If using that amount of memory (32 MB) is not possible in some contexts then
|
||||
// the time parameter can be increased to compensate.
|
||||
// The example above uses time=3 and memory=32*1024. Argon2i generally
|
||||
// requires more passes over memory than Argon2id. If in doubt, prefer IDKey
|
||||
// and its Argon2id parameter recommendations.
|
||||
//
|
||||
// The time parameter specifies the number of passes over the memory and the
|
||||
// memory parameter specifies the size of the memory in KiB. For example
|
||||
@@ -69,8 +72,6 @@ const (
|
||||
// adjusted to the number of available CPUs. The cost parameters should be
|
||||
// increased as memory latency and CPU parallelism increases. Remember to get a
|
||||
// good random salt.
|
||||
//
|
||||
// [RFC 9106 Section 7.3]: https://www.rfc-editor.org/rfc/rfc9106.html#section-7.3
|
||||
func Key(password, salt []byte, time, memory uint32, threads uint8, keyLen uint32) []byte {
|
||||
return deriveKey(argon2i, password, salt, nil, nil, time, memory, threads, keyLen)
|
||||
}
|
||||
@@ -83,20 +84,20 @@ func Key(password, salt []byte, time, memory uint32, threads uint8, keyLen uint3
|
||||
// For example, you can get a derived key for e.g. AES-256 (which needs a
|
||||
// 32-byte key) by doing:
|
||||
//
|
||||
// key := argon2.IDKey([]byte("some password"), salt, 1, 64*1024, 4, 32)
|
||||
// key := argon2.IDKey([]byte("some password"), salt, 1, 2*1024*1024, 4, 32)
|
||||
//
|
||||
// [RFC 9106 Section 7.3] recommends time=1, and memory=64*1024 as a sensible number.
|
||||
// If using that amount of memory (64 MB) is not possible in some contexts then
|
||||
// the time parameter can be increased to compensate.
|
||||
// The example above uses the first [RFC 9106 Section 4] recommended option.
|
||||
// If much less memory is available, the second recommended option is time=3,
|
||||
// memory=64*1024 KiB (64 MiB), and threads=4.
|
||||
//
|
||||
// The time parameter specifies the number of passes over the memory and the
|
||||
// memory parameter specifies the size of the memory in KiB. For example
|
||||
// memory=64*1024 sets the memory cost to ~64 MB. The number of threads can be
|
||||
// adjusted to the numbers of available CPUs. The cost parameters should be
|
||||
// memory=2*1024*1024 sets the memory cost to ~2 GiB. The number of threads can
|
||||
// be adjusted to the numbers of available CPUs. The cost parameters should be
|
||||
// increased as memory latency and CPU parallelism increases. Remember to get a
|
||||
// good random salt.
|
||||
//
|
||||
// [RFC 9106 Section 7.3]: https://www.rfc-editor.org/rfc/rfc9106.html#section-7.3
|
||||
// [RFC 9106 Section 4]: https://www.rfc-editor.org/rfc/rfc9106.html#section-4
|
||||
func IDKey(password, salt []byte, time, memory uint32, threads uint8, keyLen uint32) []byte {
|
||||
return deriveKey(argon2id, password, salt, nil, nil, time, memory, threads, keyLen)
|
||||
}
|
||||
|
||||
+2
@@ -41,6 +41,7 @@ func ForwardToAgent(client *ssh.Client, keyring Agent) error {
|
||||
continue
|
||||
}
|
||||
go ssh.DiscardRequests(reqs)
|
||||
go io.Copy(io.Discard, channel.Stderr())
|
||||
go func() {
|
||||
ServeAgent(keyring, channel)
|
||||
channel.Close()
|
||||
@@ -72,6 +73,7 @@ func ForwardToRemote(client *ssh.Client, addr string) error {
|
||||
continue
|
||||
}
|
||||
go ssh.DiscardRequests(reqs)
|
||||
go io.Copy(io.Discard, channel.Stderr())
|
||||
go forwardUnixSocket(channel, addr)
|
||||
}
|
||||
}()
|
||||
|
||||
+47
-6
@@ -304,19 +304,60 @@ func parseEd25519Key(req []byte) (*AddedKey, error) {
|
||||
return addedKey, nil
|
||||
}
|
||||
|
||||
func checkDSAParams(param *dsa.Parameters) error {
|
||||
// SSH specifies FIPS 186-2, which only provided a single size
|
||||
// (1024 bits) DSA key. FIPS 186-3 allows for larger key
|
||||
// sizes, which would confuse SSH.
|
||||
if l := param.P.BitLen(); l != 1024 {
|
||||
return fmt.Errorf("ssh: unsupported DSA key size %d", l)
|
||||
}
|
||||
|
||||
// FIPS 186-2 specifies that Q must be exactly 160 bits. We must enforce
|
||||
// this to prevent DoS attacks where an attacker sends a huge Q which makes
|
||||
// verification slow.
|
||||
if l := param.Q.BitLen(); l != 160 {
|
||||
return fmt.Errorf("ssh: unsupported DSA sub-prime size %d", l)
|
||||
}
|
||||
|
||||
// The generator G is an element of the group, so it must be strictly less
|
||||
// than the modulus P.
|
||||
if param.G.Cmp(param.P) >= 0 {
|
||||
return errors.New("ssh: DSA generator larger than modulus")
|
||||
}
|
||||
|
||||
// G must be positive.
|
||||
if param.G.Sign() <= 0 {
|
||||
return errors.New("ssh: DSA generator must be positive")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func parseDSAKey(req []byte) (*AddedKey, error) {
|
||||
var k dsaKeyMsg
|
||||
if err := ssh.Unmarshal(req, &k); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
params := dsa.Parameters{
|
||||
P: k.P,
|
||||
Q: k.Q,
|
||||
G: k.G,
|
||||
}
|
||||
if err := checkDSAParams(¶ms); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// The public value Y must be a non-zero element of the group, i.e. strictly
|
||||
// between 0 and P, to prevent a maliciously oversized Y from slowing
|
||||
// signature operations.
|
||||
if k.Y.Sign() <= 0 || k.Y.Cmp(k.P) >= 0 {
|
||||
return nil, errors.New("agent: DSA public value Y out of range")
|
||||
}
|
||||
|
||||
priv := &dsa.PrivateKey{
|
||||
PublicKey: dsa.PublicKey{
|
||||
Parameters: dsa.Parameters{
|
||||
P: k.P,
|
||||
Q: k.Q,
|
||||
G: k.G,
|
||||
},
|
||||
Y: k.Y,
|
||||
Parameters: params,
|
||||
Y: k.Y,
|
||||
},
|
||||
X: k.X,
|
||||
}
|
||||
|
||||
+26
-10
@@ -182,14 +182,19 @@ func ParseKnownHosts(in []byte) (marker string, hosts []string, pubKey PublicKey
|
||||
}
|
||||
|
||||
hosts := string(keyFields[0])
|
||||
// keyFields[1] contains the key type (e.g. “ssh-rsa”).
|
||||
// However, that information is duplicated inside the
|
||||
// base64-encoded key and so is ignored here.
|
||||
// keyFields[1] contains the key type (e.g. "ssh-rsa"). This information
|
||||
// is duplicated within the base64-encoded key blob. As OpenSSH's
|
||||
// sshkey_read does, we verify that the declared key type matches the
|
||||
// type embedded in the key blob.
|
||||
wantType := string(keyFields[1])
|
||||
|
||||
key := bytes.Join(keyFields[2:], []byte(" "))
|
||||
if pubKey, comment, err = parseAuthorizedKey(key); err != nil {
|
||||
return "", nil, nil, "", nil, err
|
||||
}
|
||||
if pubKey.Type() != wantType {
|
||||
return "", nil, nil, "", nil, fmt.Errorf("ssh: known hosts key type mismatch: human-readable type %q, encoded type %q", wantType, pubKey.Type())
|
||||
}
|
||||
|
||||
return marker, strings.Split(hosts, ","), pubKey, comment, rest, nil
|
||||
}
|
||||
@@ -228,10 +233,17 @@ func ParseAuthorizedKey(in []byte) (out PublicKey, comment string, options []str
|
||||
}
|
||||
|
||||
if out, comment, err = parseAuthorizedKey(in[i:]); err == nil {
|
||||
return out, comment, options, rest, nil
|
||||
} else {
|
||||
lastErr = err
|
||||
// The first field contains the declared key type. As OpenSSH's
|
||||
// sshkey_read does, we verify that it matches the type embedded in
|
||||
// the key blob. Without this check, a single-token option (e.g.
|
||||
// "restrict") appearing in the key type position could be silently
|
||||
// discarded along with its intended effect.
|
||||
if string(in[:i]) == out.Type() {
|
||||
return out, comment, options, rest, nil
|
||||
}
|
||||
err = fmt.Errorf("ssh: authorized keys key type mismatch: human-readable type %q, encoded type %q", in[:i], out.Type())
|
||||
}
|
||||
lastErr = err
|
||||
|
||||
// No key type recognised. Maybe there's an options field at
|
||||
// the beginning.
|
||||
@@ -271,11 +283,15 @@ func ParseAuthorizedKey(in []byte) (out PublicKey, comment string, options []str
|
||||
}
|
||||
|
||||
if out, comment, err = parseAuthorizedKey(in[i:]); err == nil {
|
||||
options = candidateOptions
|
||||
return out, comment, options, rest, nil
|
||||
} else {
|
||||
lastErr = err
|
||||
// As above, the declared key type (here following the options
|
||||
// field) must match the type embedded in the key blob.
|
||||
if string(in[:i]) == out.Type() {
|
||||
options = candidateOptions
|
||||
return out, comment, options, rest, nil
|
||||
}
|
||||
err = fmt.Errorf("ssh: authorized keys key type mismatch: human-readable type %q, encoded type %q", in[:i], out.Type())
|
||||
}
|
||||
lastErr = err
|
||||
|
||||
in = rest
|
||||
continue
|
||||
|
||||
+10
-1
@@ -44,7 +44,16 @@ type disconnectMsg struct {
|
||||
}
|
||||
|
||||
func (d *disconnectMsg) Error() string {
|
||||
return fmt.Sprintf("ssh: disconnect, reason %d: %s", d.Reason, d.Message)
|
||||
return fmt.Sprintf("ssh: disconnect, reason %d: %q", d.Reason, sanitizeString(d.Message))
|
||||
}
|
||||
|
||||
func sanitizeString(s string) string {
|
||||
return strings.Map(func(r rune) rune {
|
||||
if r == '\t' || (r >= ' ' && r < 0x7f) {
|
||||
return r
|
||||
}
|
||||
return -1
|
||||
}, s)
|
||||
}
|
||||
|
||||
// See RFC 4253, section 7.1.
|
||||
|
||||
+7
@@ -9,6 +9,13 @@
|
||||
// implementing the golang.org/x/image/font.Face interface.
|
||||
//
|
||||
// The sibling golang.org/x/image/font/sfnt package provides a low-level API.
|
||||
//
|
||||
// # Security Considerations
|
||||
//
|
||||
// This package is not hardened against malicious inputs.
|
||||
// Crashes, excessive CPU or memory consumption, or similar misbehavior
|
||||
// caused by malicious or corrupt inputs will be handled as ordinary bugs,
|
||||
// not vulnerabilities.
|
||||
package opentype // import "golang.org/x/image/font/opentype"
|
||||
|
||||
import (
|
||||
|
||||
+7
@@ -28,6 +28,13 @@
|
||||
// another io.Writer, copying the underlying TTF file, but this package does
|
||||
// not provide an encoder. Specifically, there is no API to build a different
|
||||
// TTF file, whether 'from scratch' or by modifying an existing one.
|
||||
//
|
||||
// # Security Considerations
|
||||
//
|
||||
// This package is not hardened against malicious inputs.
|
||||
// Crashes, excessive CPU or memory consumption, or similar misbehavior
|
||||
// caused by malicious or corrupt inputs will be handled as ordinary bugs,
|
||||
// not vulnerabilities.
|
||||
package sfnt // import "golang.org/x/image/font/sfnt"
|
||||
|
||||
// This implementation was written primarily to the
|
||||
|
||||
+24
-5
@@ -342,13 +342,25 @@ func (d *decoder) decode(dst image.Image, xmin, ymin, xmax, ymax int) error {
|
||||
}
|
||||
}
|
||||
|
||||
// calcRowBytes returns the number of bytes in a row with numSamples samples per pixel
|
||||
// and bytesPerSample bytes per sample.
|
||||
calcRowBytes := func(xmin, xmax, numSamples int, bitsPerSample uint) int {
|
||||
return int((int64(xmax-xmin)*int64(numSamples)*int64(bitsPerSample) + 7) / 8)
|
||||
}
|
||||
// calcRowOff returns the offset of the next row.
|
||||
calcRowOff := func(y, ymin, rowBytes int) int {
|
||||
return (y - ymin) * rowBytes
|
||||
}
|
||||
|
||||
rMaxX := minInt(xmax, dst.Bounds().Max.X)
|
||||
rMaxY := minInt(ymax, dst.Bounds().Max.Y)
|
||||
switch d.mode {
|
||||
case mGray, mGrayInvert:
|
||||
rowBytes := calcRowBytes(xmin, xmax, 1, d.bpp)
|
||||
if d.bpp == 16 {
|
||||
img := dst.(*image.Gray16)
|
||||
for y := ymin; y < rMaxY; y++ {
|
||||
d.off = calcRowOff(y, ymin, rowBytes)
|
||||
for x := xmin; x < rMaxX; x++ {
|
||||
if d.off+2 > len(d.buf) {
|
||||
return errNoPixels
|
||||
@@ -360,14 +372,13 @@ func (d *decoder) decode(dst image.Image, xmin, ymin, xmax, ymax int) error {
|
||||
}
|
||||
img.SetGray16(x, y, color.Gray16{v})
|
||||
}
|
||||
if rMaxX == img.Bounds().Max.X {
|
||||
d.off += 2 * (xmax - img.Bounds().Max.X)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
img := dst.(*image.Gray)
|
||||
max := uint32((1 << d.bpp) - 1)
|
||||
for y := ymin; y < rMaxY; y++ {
|
||||
d.off = calcRowOff(y, ymin, rowBytes)
|
||||
d.flushBits()
|
||||
for x := xmin; x < rMaxX; x++ {
|
||||
v, ok := d.readBits(d.bpp)
|
||||
if !ok {
|
||||
@@ -379,13 +390,15 @@ func (d *decoder) decode(dst image.Image, xmin, ymin, xmax, ymax int) error {
|
||||
}
|
||||
img.SetGray(x, y, color.Gray{uint8(v)})
|
||||
}
|
||||
d.flushBits()
|
||||
}
|
||||
}
|
||||
case mPaletted:
|
||||
img := dst.(*image.Paletted)
|
||||
pLen := len(d.palette)
|
||||
rowBytes := calcRowBytes(xmin, xmax, 1, d.bpp)
|
||||
for y := ymin; y < rMaxY; y++ {
|
||||
d.off = calcRowOff(y, ymin, rowBytes)
|
||||
d.flushBits()
|
||||
for x := xmin; x < rMaxX; x++ {
|
||||
v, ok := d.readBits(d.bpp)
|
||||
if !ok {
|
||||
@@ -397,12 +410,13 @@ func (d *decoder) decode(dst image.Image, xmin, ymin, xmax, ymax int) error {
|
||||
}
|
||||
img.SetColorIndex(x, y, idx)
|
||||
}
|
||||
d.flushBits()
|
||||
}
|
||||
case mRGB:
|
||||
rowBytes := calcRowBytes(xmin, xmax, 3, d.bpp)
|
||||
if d.bpp == 16 {
|
||||
img := dst.(*image.RGBA64)
|
||||
for y := ymin; y < rMaxY; y++ {
|
||||
d.off = calcRowOff(y, ymin, rowBytes)
|
||||
for x := xmin; x < rMaxX; x++ {
|
||||
if d.off+6 > len(d.buf) {
|
||||
return errNoPixels
|
||||
@@ -417,6 +431,7 @@ func (d *decoder) decode(dst image.Image, xmin, ymin, xmax, ymax int) error {
|
||||
} else {
|
||||
img := dst.(*image.RGBA)
|
||||
for y := ymin; y < rMaxY; y++ {
|
||||
d.off = calcRowOff(y, ymin, rowBytes)
|
||||
min := img.PixOffset(xmin, y)
|
||||
max := img.PixOffset(rMaxX, y)
|
||||
off := (y - ymin) * (xmax - xmin) * 3
|
||||
@@ -433,9 +448,11 @@ func (d *decoder) decode(dst image.Image, xmin, ymin, xmax, ymax int) error {
|
||||
}
|
||||
}
|
||||
case mNRGBA:
|
||||
rowBytes := calcRowBytes(xmin, xmax, 4, d.bpp)
|
||||
if d.bpp == 16 {
|
||||
img := dst.(*image.NRGBA64)
|
||||
for y := ymin; y < rMaxY; y++ {
|
||||
d.off = calcRowOff(y, ymin, rowBytes)
|
||||
for x := xmin; x < rMaxX; x++ {
|
||||
if d.off+8 > len(d.buf) {
|
||||
return errNoPixels
|
||||
@@ -461,9 +478,11 @@ func (d *decoder) decode(dst image.Image, xmin, ymin, xmax, ymax int) error {
|
||||
}
|
||||
}
|
||||
case mRGBA:
|
||||
rowBytes := calcRowBytes(xmin, xmax, 4, d.bpp)
|
||||
if d.bpp == 16 {
|
||||
img := dst.(*image.RGBA64)
|
||||
for y := ymin; y < rMaxY; y++ {
|
||||
d.off = calcRowOff(y, ymin, rowBytes)
|
||||
for x := xmin; x < rMaxX; x++ {
|
||||
if d.off+8 > len(d.buf) {
|
||||
return errNoPixels
|
||||
|
||||
+30
-6
@@ -5,6 +5,7 @@
|
||||
package webp
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"errors"
|
||||
"image"
|
||||
@@ -113,16 +114,39 @@ func decode(r io.Reader, configOnly bool) (image.Image, image.Config, error) {
|
||||
c, err := vp8l.DecodeConfig(chunkData)
|
||||
return nil, c, err
|
||||
}
|
||||
if seenVP8X {
|
||||
// Verify the VP8L chunk dimensions match before
|
||||
// calling vp8l.Decode, to catch malicious images
|
||||
// following a small VP8X header with a huge VP8L chunk.
|
||||
//
|
||||
// Peek the VP8L header.
|
||||
//
|
||||
// chunkData is always an unbuffered riff.chunkReader.
|
||||
// Creating a bufio.Reader here doesn't add any
|
||||
// inefficiency, since the vp8l package will do it
|
||||
// if we don't.
|
||||
bufReader := bufio.NewReader(chunkData)
|
||||
chunkData = bufReader
|
||||
const vp8lHeaderSize = 5
|
||||
vp8lHeader, err := bufReader.Peek(vp8lHeaderSize)
|
||||
if err != nil {
|
||||
if err == io.EOF {
|
||||
err = errInvalidFormat
|
||||
}
|
||||
return nil, image.Config{}, err
|
||||
}
|
||||
c, err := vp8l.DecodeConfig(bytes.NewReader(vp8lHeader))
|
||||
if err != nil {
|
||||
return nil, image.Config{}, err
|
||||
}
|
||||
if c.Width != int(widthMinusOne)+1 || c.Height != int(heightMinusOne)+1 {
|
||||
return nil, image.Config{}, errInvalidFormat
|
||||
}
|
||||
}
|
||||
m, err := vp8l.Decode(chunkData)
|
||||
if err != nil {
|
||||
return nil, image.Config{}, err
|
||||
}
|
||||
if seenVP8X {
|
||||
bounds := m.Bounds()
|
||||
if bounds.Dx() != int(widthMinusOne)+1 || bounds.Dy() != int(heightMinusOne)+1 {
|
||||
return nil, image.Config{}, errInvalidFormat
|
||||
}
|
||||
}
|
||||
return m, image.Config{}, nil
|
||||
|
||||
case fccVP8X:
|
||||
|
||||
+7
@@ -49,6 +49,13 @@ to extensions, which are essentially calls to kernel utility
|
||||
functions. Currently, the only extensions supported by this package
|
||||
are the Linux packet filter extensions.
|
||||
|
||||
# Security Considerations
|
||||
|
||||
The implementation of the BPF VM in this package is suitable for
|
||||
testing BPF programs. It aims for consistency with other BPF VM
|
||||
implementations, but divergence in behavior is not considered a
|
||||
security issue.
|
||||
|
||||
# Examples
|
||||
|
||||
This packet filter selects all ARP packets.
|
||||
|
||||
+13
-11
@@ -55,7 +55,7 @@ type transportConfig struct {
|
||||
// Registered is called by net/http.Transport.RegisterProtocol,
|
||||
// to let us know that it understands the registration mechanism we're using.
|
||||
func (t transportConfig) Registered(t1 *http.Transport) {
|
||||
t.t.t1 = t1
|
||||
t.t.lazyt1 = t1
|
||||
}
|
||||
|
||||
func (t transportConfig) DisableCompression() bool {
|
||||
@@ -145,29 +145,30 @@ func (t transportConfig) DialFromContext(ctx context.Context, network, address s
|
||||
|
||||
type transportInternal struct {
|
||||
initOnce sync.Once
|
||||
t1 *http.Transport
|
||||
lazyt1 *http.Transport
|
||||
}
|
||||
|
||||
func (t *Transport) init() {
|
||||
func (t *Transport) init() *http.Transport {
|
||||
t.initOnce.Do(func() {
|
||||
if t.t1 != nil {
|
||||
if t.lazyt1 != nil {
|
||||
return
|
||||
}
|
||||
t1 := &http.Transport{}
|
||||
t.configure(t1)
|
||||
})
|
||||
return t.lazyt1
|
||||
}
|
||||
|
||||
func (t *Transport) configure(t1 *http.Transport) {
|
||||
t1.RegisterProtocol("http/2", transportConfig{t})
|
||||
// tr2.t1 is set by transportConfig.Registered.
|
||||
if t.t1 != t1 {
|
||||
// tr2.lazyt1 is set by transportConfig.Registered.
|
||||
if t.lazyt1 != t1 {
|
||||
panic("http2: net/http does not support this version of x/net/http2")
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Transport) roundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Response, error) {
|
||||
t.init()
|
||||
t1 := t.init()
|
||||
|
||||
if req.URL.Scheme == "http" && !t.AllowHTTP {
|
||||
return nil, errors.New("http2: unencrypted HTTP/2 not enabled")
|
||||
@@ -188,22 +189,23 @@ func (t *Transport) roundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
|
||||
ctx := context.WithValue(req.Context(), http2TransportContextKey{}, t)
|
||||
req = req.WithContext(ctx)
|
||||
|
||||
return t.t1.RoundTrip(req)
|
||||
return t1.RoundTrip(req)
|
||||
}
|
||||
|
||||
func (t *Transport) closeIdleConnections() {
|
||||
t.init()
|
||||
t.t1.CloseIdleConnections()
|
||||
t1 := t.init()
|
||||
t1.CloseIdleConnections()
|
||||
}
|
||||
|
||||
func (t *Transport) newUserClientConn(c net.Conn) (*ClientConn, error) {
|
||||
t1 := t.init()
|
||||
// http.Transport's NewClientConn doesn't provide a supported way to create
|
||||
// a connection from a net.Conn. (This might be useful to add in the future?)
|
||||
// We're going to craftily sneak one in via the context key, with the
|
||||
// scheme of "http/2" telling NewClientConn to look for it.
|
||||
ctx := context.WithValue(context.Background(), netConnContextKey{}, c)
|
||||
|
||||
nhcc, err := t.t1.NewClientConn(ctx, "http/2", "")
|
||||
nhcc, err := t1.NewClientConn(ctx, "http/2", "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
+5
-1
@@ -400,7 +400,11 @@ func (p *Profile) process(s string, toASCII bool) (string, error) {
|
||||
// Spec says keep the old label.
|
||||
continue
|
||||
}
|
||||
if unicode16 && err == nil && len(u) > 0 && isASCII(u) {
|
||||
if err == nil && len(u) > 0 && isASCII(u) {
|
||||
// UTS 43 pre-revision 33 doesn't classify a xn-- label
|
||||
// which contains only ASCII characters as an error,
|
||||
// but that's a specification bug and a security issue.
|
||||
// Always return an error in this case.
|
||||
err = punyError(enc)
|
||||
}
|
||||
isBidi = isBidi || bidirule.DirectionString(u) != bidi.LeftToRight
|
||||
|
||||
+13
-4
@@ -24,7 +24,7 @@ func NewWeighted(n int64) *Weighted {
|
||||
}
|
||||
|
||||
// Weighted provides a way to bound concurrent access to a resource.
|
||||
// The callers can request access with a given weight.
|
||||
// The callers can request access with a given non-negative weight.
|
||||
type Weighted struct {
|
||||
size int64
|
||||
cur int64
|
||||
@@ -32,10 +32,13 @@ type Weighted struct {
|
||||
waiters list.List
|
||||
}
|
||||
|
||||
// Acquire acquires the semaphore with a weight of n, blocking until resources
|
||||
// Acquire acquires the semaphore with a non-negative weight of n, blocking until resources
|
||||
// are available or ctx is done. On success, returns nil. On failure, returns
|
||||
// ctx.Err() and leaves the semaphore unchanged.
|
||||
func (s *Weighted) Acquire(ctx context.Context, n int64) error {
|
||||
if n < 0 {
|
||||
panic("semaphore: n < 0")
|
||||
}
|
||||
done := ctx.Done()
|
||||
|
||||
s.mu.Lock()
|
||||
@@ -106,9 +109,12 @@ func (s *Weighted) Acquire(ctx context.Context, n int64) error {
|
||||
}
|
||||
}
|
||||
|
||||
// TryAcquire acquires the semaphore with a weight of n without blocking.
|
||||
// TryAcquire acquires the semaphore with a non-negative weight of n without blocking.
|
||||
// On success, returns true. On failure, returns false and leaves the semaphore unchanged.
|
||||
func (s *Weighted) TryAcquire(n int64) bool {
|
||||
if n < 0 {
|
||||
panic("semaphore: n < 0")
|
||||
}
|
||||
s.mu.Lock()
|
||||
success := s.size-s.cur >= n && s.waiters.Len() == 0
|
||||
if success {
|
||||
@@ -118,8 +124,11 @@ func (s *Weighted) TryAcquire(n int64) bool {
|
||||
return success
|
||||
}
|
||||
|
||||
// Release releases the semaphore with a weight of n.
|
||||
// Release releases the semaphore with a non-negative weight of n.
|
||||
func (s *Weighted) Release(n int64) {
|
||||
if n < 0 {
|
||||
panic("semaphore: n < 0")
|
||||
}
|
||||
s.mu.Lock()
|
||||
s.cur -= n
|
||||
if s.cur < 0 {
|
||||
|
||||
+37
-25
@@ -6,38 +6,50 @@ package cpu
|
||||
|
||||
import "strconv"
|
||||
|
||||
// parseRelease parses a dot-separated version number. It follows the semver
|
||||
// syntax, but allows the minor and patch versions to be elided.
|
||||
// parseRelease parses a dot-separated version number from the prefix
|
||||
// of rel. It returns ok=true only if at least the major and minor
|
||||
// components were successfully parsed; the patch component is
|
||||
// best-effort. Trailing vendor or build suffixes such as
|
||||
// "-generic", "+", "_hi3535", or "-rc1" are ignored.
|
||||
//
|
||||
// This is a copy of the Go runtime's parseRelease from
|
||||
// https://golang.org/cl/209597.
|
||||
// https://golang.org/cl/209597, updated in https://golang.org/cl/781800.
|
||||
func parseRelease(rel string) (major, minor, patch int, ok bool) {
|
||||
// Strip anything after a dash or plus.
|
||||
for i := range len(rel) {
|
||||
if rel[i] == '-' || rel[i] == '+' {
|
||||
rel = rel[:i]
|
||||
break
|
||||
// next consumes a run of decimal digits from the front of rel,
|
||||
// returning the parsed value. If the digits are followed by a
|
||||
// '.', it is consumed and more is set so the caller knows to
|
||||
// parse another component; otherwise scanning terminates and
|
||||
// the rest of rel is discarded.
|
||||
next := func() (n int, more, ok bool) {
|
||||
i := 0
|
||||
for i < len(rel) && rel[i] >= '0' && rel[i] <= '9' {
|
||||
i++
|
||||
}
|
||||
if i == 0 {
|
||||
return 0, false, false
|
||||
}
|
||||
n, err := strconv.Atoi(rel[:i])
|
||||
if err != nil {
|
||||
return 0, false, false
|
||||
}
|
||||
if i < len(rel) && rel[i] == '.' {
|
||||
rel = rel[i+1:]
|
||||
return n, true, true
|
||||
}
|
||||
rel = ""
|
||||
return n, false, true
|
||||
}
|
||||
|
||||
next := func() (int, bool) {
|
||||
for i := range len(rel) {
|
||||
if rel[i] == '.' {
|
||||
ver, err := strconv.Atoi(rel[:i])
|
||||
rel = rel[i+1:]
|
||||
return ver, err == nil
|
||||
}
|
||||
}
|
||||
ver, err := strconv.Atoi(rel)
|
||||
rel = ""
|
||||
return ver, err == nil
|
||||
var more bool
|
||||
if major, more, ok = next(); !ok || !more {
|
||||
return 0, 0, 0, false
|
||||
}
|
||||
if major, ok = next(); !ok || rel == "" {
|
||||
return
|
||||
if minor, more, ok = next(); !ok {
|
||||
return 0, 0, 0, false
|
||||
}
|
||||
if minor, ok = next(); !ok || rel == "" {
|
||||
return
|
||||
if !more {
|
||||
return major, minor, 0, true
|
||||
}
|
||||
patch, ok = next()
|
||||
return
|
||||
patch, _, _ = next()
|
||||
return major, minor, patch, true
|
||||
}
|
||||
+1
@@ -1874,6 +1874,7 @@ func Dup2(oldfd, newfd int) error {
|
||||
//sys Dup3(oldfd int, newfd int, flags int) (err error)
|
||||
//sysnb EpollCreate1(flag int) (fd int, err error)
|
||||
//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
|
||||
//sys Eventfd(initval uint, flags int) (fd int, err error) = SYS_EVENTFD2
|
||||
//sys Exit(code int) = SYS_EXIT_GROUP
|
||||
//sys Fallocate(fd int, mode uint32, off int64, len int64) (err error)
|
||||
|
||||
-1
@@ -20,7 +20,6 @@ func setTimeval(sec, usec int64) Timeval {
|
||||
|
||||
// 64-bit file system and 32-bit uid calls
|
||||
// (386 default is 32-bit file system and 16-bit uid).
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
|
||||
-1
@@ -6,7 +6,6 @@
|
||||
|
||||
package unix
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
|
||||
-1
@@ -44,7 +44,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
|
||||
|
||||
// 64-bit file system and 32-bit uid calls
|
||||
// (16-bit uid calls are not always supported in newer kernels)
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||
|
||||
-1
@@ -8,7 +8,6 @@ package unix
|
||||
|
||||
import "unsafe"
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
|
||||
-1
@@ -8,7 +8,6 @@ package unix
|
||||
|
||||
import "unsafe"
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
|
||||
-1
@@ -6,7 +6,6 @@
|
||||
|
||||
package unix
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
|
||||
|
||||
-1
@@ -13,7 +13,6 @@ import (
|
||||
|
||||
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
|
||||
|
||||
-1
@@ -11,7 +11,6 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
|
||||
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
|
||||
|
||||
-1
@@ -6,7 +6,6 @@
|
||||
|
||||
package unix
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
|
||||
-1
@@ -8,7 +8,6 @@ package unix
|
||||
|
||||
import "unsafe"
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
|
||||
-1
@@ -10,7 +10,6 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
|
||||
-1
@@ -6,7 +6,6 @@
|
||||
|
||||
package unix
|
||||
|
||||
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
|
||||
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
|
||||
//sys Fchown(fd int, uid int, gid int) (err error)
|
||||
//sys Fstat(fd int, stat *Stat_t) (err error)
|
||||
|
||||
+7
-1
@@ -1359,6 +1359,7 @@ const (
|
||||
FAN_UNLIMITED_MARKS = 0x20
|
||||
FAN_UNLIMITED_QUEUE = 0x10
|
||||
FD_CLOEXEC = 0x1
|
||||
FD_PIDFS_ROOT = -0x2712
|
||||
FD_SETSIZE = 0x400
|
||||
FF0 = 0x0
|
||||
FIB_RULE_DEV_DETACHED = 0x8
|
||||
@@ -1970,6 +1971,8 @@ const (
|
||||
MADV_DONTNEED = 0x4
|
||||
MADV_DONTNEED_LOCKED = 0x18
|
||||
MADV_FREE = 0x8
|
||||
MADV_GUARD_INSTALL = 0x66
|
||||
MADV_GUARD_REMOVE = 0x67
|
||||
MADV_HUGEPAGE = 0xe
|
||||
MADV_HWPOISON = 0x64
|
||||
MADV_KEEPONFORK = 0x13
|
||||
@@ -2114,7 +2117,7 @@ const (
|
||||
MS_NOSEC = 0x10000000
|
||||
MS_NOSUID = 0x2
|
||||
MS_NOSYMFOLLOW = 0x100
|
||||
MS_NOUSER = -0x80000000
|
||||
MS_NOUSER = 0x80000000
|
||||
MS_POSIXACL = 0x10000
|
||||
MS_PRIVATE = 0x40000
|
||||
MS_RDONLY = 0x1
|
||||
@@ -3786,6 +3789,9 @@ const (
|
||||
TCPOPT_TIMESTAMP = 0x8
|
||||
TCPOPT_TSTAMP_HDR = 0x101080a
|
||||
TCPOPT_WINDOW = 0x3
|
||||
TCP_AO_KEYF_EXCLUDE_OPT = 0x2
|
||||
TCP_AO_KEYF_IFINDEX = 0x1
|
||||
TCP_AO_MAXKEYLEN = 0x50
|
||||
TCP_CC_INFO = 0x1a
|
||||
TCP_CM_INQ = 0x24
|
||||
TCP_CONGESTION = 0xd
|
||||
|
||||
+17
@@ -700,6 +700,23 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Eventfd(initval uint, flags int) (fd int, err error) {
|
||||
r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
|
||||
fd = int(r0)
|
||||
|
||||
-17
@@ -45,23 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))
|
||||
if e1 != 0 {
|
||||
|
||||
-17
@@ -45,23 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
-17
@@ -213,23 +213,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fchown(fd int, uid int, gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))
|
||||
if e1 != 0 {
|
||||
|
||||
-17
@@ -45,23 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
-17
@@ -45,23 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
-17
@@ -45,23 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||
_, _, e1 := Syscall9(SYS_FADVISE64, uintptr(fd), 0, uintptr(offset>>32), uintptr(offset), uintptr(length>>32), uintptr(length), uintptr(advice), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
-17
@@ -45,23 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
-17
@@ -45,23 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
-17
@@ -45,23 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||
_, _, e1 := Syscall9(SYS_FADVISE64, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
-17
@@ -45,23 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fchown(fd int, uid int, gid int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
|
||||
if e1 != 0 {
|
||||
|
||||
-17
@@ -45,23 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
-17
@@ -45,23 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
-17
@@ -45,23 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
-17
@@ -45,23 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
-17
@@ -45,23 +45,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(events) > 0 {
|
||||
_p0 = unsafe.Pointer(&events[0])
|
||||
} else {
|
||||
_p0 = unsafe.Pointer(&_zero)
|
||||
}
|
||||
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
||||
n = int(r0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
+36
@@ -1109,17 +1109,53 @@ const (
|
||||
)
|
||||
|
||||
// This type is the union inside of TRUSTEE and must be created using one of the TrusteeValueFrom* functions.
|
||||
//
|
||||
// Go pointers stored in a TrusteeValue must be pinned using [runtime.Pinner]
|
||||
// for the lifetime of the TrusteeValue.
|
||||
type TrusteeValue uintptr
|
||||
|
||||
// TrusteeValueFromString is unsafe and should not be used.
|
||||
//
|
||||
// It returns a uintptr containing a reference to newly-allocated memory
|
||||
// which will be freed by the garbage collector.
|
||||
// There is no way for the caller to safely reference this memory.
|
||||
//
|
||||
// To create a [TrusteeValue] from a string, use:
|
||||
//
|
||||
// p, err := windows.UTF16PtrFromString(s)
|
||||
// if err != nil {
|
||||
// // handle error
|
||||
// }
|
||||
//
|
||||
// // Pin the string for as long as it is used.
|
||||
// var pinner runtime.Pinner
|
||||
// pinner.Pin(p)
|
||||
// defer pinner.Unpin()
|
||||
//
|
||||
// tv := TrusteeValue(unsafe.Pointer(p))
|
||||
//
|
||||
// Deprecated: TrusteeValueFromString is unsafe and should not be used.
|
||||
func TrusteeValueFromString(str string) TrusteeValue {
|
||||
return TrusteeValue(unsafe.Pointer(StringToUTF16Ptr(str)))
|
||||
}
|
||||
|
||||
// TrusteeValueFromSID returns a [TrusteeValue] referencing sid.
|
||||
//
|
||||
// The caller must pin sid using a [runtime.Pinner] for the lifetime of the TrusteeValue.
|
||||
func TrusteeValueFromSID(sid *SID) TrusteeValue {
|
||||
return TrusteeValue(unsafe.Pointer(sid))
|
||||
}
|
||||
|
||||
// TrusteeValueFromObjectsAndSid returns a [TrusteeValue] referencing objectsAndSid.
|
||||
//
|
||||
// The caller must pin objectsAndSid using a [runtime.Pinner] for the lifetime of the TrusteeValue.
|
||||
func TrusteeValueFromObjectsAndSid(objectsAndSid *OBJECTS_AND_SID) TrusteeValue {
|
||||
return TrusteeValue(unsafe.Pointer(objectsAndSid))
|
||||
}
|
||||
|
||||
// TrusteeValueFromObjectsAndName returns a [TrusteeValue] referencing objectsAndName.
|
||||
//
|
||||
// The caller must pin objectsAndName using a [runtime.Pinner] for the lifetime of the TrusteeValue.
|
||||
func TrusteeValueFromObjectsAndName(objectsAndName *OBJECTS_AND_NAME) TrusteeValue {
|
||||
return TrusteeValue(unsafe.Pointer(objectsAndName))
|
||||
}
|
||||
|
||||
+6
-2
@@ -1728,11 +1728,15 @@ func (s *NTUnicodeString) String() string {
|
||||
// the more common *uint16 string type.
|
||||
func NewNTString(s string) (*NTString, error) {
|
||||
var nts NTString
|
||||
s8, err := BytePtrFromString(s)
|
||||
s8, err := ByteSliceFromString(s)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
RtlInitString(&nts, s8)
|
||||
// The source string plus its terminating NUL must fit within MAX_USHORT.
|
||||
if len(s8) > MAX_USHORT {
|
||||
return nil, syscall.EINVAL
|
||||
}
|
||||
RtlInitString(&nts, &s8[0])
|
||||
return &nts, nil
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -169,6 +169,7 @@ const (
|
||||
FORMAT_MESSAGE_ARGUMENT_ARRAY = 8192
|
||||
FORMAT_MESSAGE_MAX_WIDTH_MASK = 255
|
||||
|
||||
MAX_USHORT = 0xffff
|
||||
MAX_PATH = 260
|
||||
MAX_LONG_PATH = 32768
|
||||
|
||||
|
||||
+11
@@ -141,6 +141,17 @@ var (
|
||||
// feature if unforeseen issues arise, and it will be removed in a future
|
||||
// release.
|
||||
EnableHTTPFramerReadBufferPooling = boolFromEnv("GRPC_GO_EXPERIMENTAL_HTTP_FRAMER_READ_BUFFER_POOLING", true)
|
||||
|
||||
// ControlBufferThrottleLimit is the maximum number of control frames that can
|
||||
// be queued in the control buffer before throttling is applied. The value
|
||||
// must be between 1 and 10,000, and is set to 100 by default.
|
||||
//
|
||||
// This environment variable serves as an escape hatch to increase the
|
||||
// throttling limit if unforeseen issues arise, and it will be removed in a
|
||||
// future release.
|
||||
//
|
||||
// TODO: Remove this env var once v1.83.0 is release.
|
||||
ControlBufferThrottleLimit = uint64FromEnv("GRPC_GO_EXPERIMENTAL_CONTROL_BUFFER_THROTTLE_LIMIT", 100, 1, 10000)
|
||||
)
|
||||
|
||||
func boolFromEnv(envVar string, def bool) bool {
|
||||
|
||||
+85
-89
@@ -29,6 +29,7 @@ import (
|
||||
|
||||
"golang.org/x/net/http2"
|
||||
"golang.org/x/net/http2/hpack"
|
||||
"google.golang.org/grpc/internal/envconfig"
|
||||
"google.golang.org/grpc/internal/grpclog"
|
||||
"google.golang.org/grpc/mem"
|
||||
)
|
||||
@@ -96,61 +97,70 @@ func (il *itemList) isEmpty() bool {
|
||||
return il.head == nil
|
||||
}
|
||||
|
||||
// maxQueuedControlBufferItems is the maximum number of frames (other than
|
||||
// HEADERS and DATA) that we will buffer before preventing new reads from
|
||||
// occurring on the transport. These are control frames sent in response to
|
||||
// client requests, or frames that result in work being scheduled, such as
|
||||
// RST_STREAM due to bad headers or settings acks.
|
||||
var maxQueuedControlBufferItems = int(envconfig.ControlBufferThrottleLimit)
|
||||
|
||||
type cbItem interface {
|
||||
isThrottled() bool
|
||||
}
|
||||
|
||||
// throttledItem represents every item in the controlBuffer to which the overall
|
||||
// throttling limit applies, other than outgoing HEADERS and DATA frames.
|
||||
type throttledItem struct{}
|
||||
|
||||
func (throttledItem) isThrottled() bool { return true }
|
||||
|
||||
// The following defines various control items which could flow through
|
||||
// the control buffer of transport. They represent different aspects of
|
||||
// control tasks, e.g., flow control, settings, streaming resetting, etc.
|
||||
|
||||
// maxQueuedTransportResponseFrames is the most queued "transport response"
|
||||
// frames we will buffer before preventing new reads from occurring on the
|
||||
// transport. These are control frames sent in response to client requests,
|
||||
// such as RST_STREAM due to bad headers or settings acks.
|
||||
const maxQueuedTransportResponseFrames = 50
|
||||
|
||||
type cbItem interface {
|
||||
isTransportResponseFrame() bool
|
||||
}
|
||||
|
||||
// registerStream is used to register an incoming stream with loopy writer.
|
||||
type registerStream struct {
|
||||
throttledItem
|
||||
streamID uint32
|
||||
wq *writeQuota
|
||||
}
|
||||
|
||||
func (*registerStream) isTransportResponseFrame() bool { return false }
|
||||
|
||||
// headerFrame is also used to register stream on the client-side.
|
||||
type headerFrame struct {
|
||||
type clientHeaders struct {
|
||||
streamID uint32
|
||||
hf []hpack.HeaderField
|
||||
endStream bool // Valid on server side.
|
||||
initStream func(uint32) error // Used only on the client side.
|
||||
initStream func(uint32) error
|
||||
onWrite func()
|
||||
wq *writeQuota // write quota for the stream created.
|
||||
cleanup *cleanupStream // Valid on the server side.
|
||||
onOrphaned func(error) // Valid on client-side
|
||||
wq *writeQuota
|
||||
onOrphaned func(error)
|
||||
}
|
||||
|
||||
func (h *headerFrame) isTransportResponseFrame() bool {
|
||||
return h.cleanup != nil && h.cleanup.rst // Results in a RST_STREAM
|
||||
func (*clientHeaders) isThrottled() bool { return false }
|
||||
|
||||
type serverHeaders struct {
|
||||
streamID uint32
|
||||
hf []hpack.HeaderField
|
||||
endStream bool
|
||||
onWrite func()
|
||||
cleanup *cleanupStream
|
||||
}
|
||||
|
||||
func (h *serverHeaders) isThrottled() bool { return false }
|
||||
|
||||
type cleanupStream struct {
|
||||
throttledItem
|
||||
streamID uint32
|
||||
rst bool
|
||||
rstCode http2.ErrCode
|
||||
onWrite func()
|
||||
}
|
||||
|
||||
func (c *cleanupStream) isTransportResponseFrame() bool { return c.rst } // Results in a RST_STREAM
|
||||
|
||||
type earlyAbortStream struct {
|
||||
throttledItem
|
||||
streamID uint32
|
||||
rst bool
|
||||
hf []hpack.HeaderField // Pre-built header fields
|
||||
}
|
||||
|
||||
func (*earlyAbortStream) isTransportResponseFrame() bool { return false }
|
||||
|
||||
type dataFrame struct {
|
||||
streamID uint32
|
||||
endStream bool
|
||||
@@ -162,70 +172,60 @@ type dataFrame struct {
|
||||
onEachWrite func()
|
||||
}
|
||||
|
||||
func (*dataFrame) isTransportResponseFrame() bool { return false }
|
||||
func (*dataFrame) isThrottled() bool { return false }
|
||||
|
||||
type incomingWindowUpdate struct {
|
||||
throttledItem
|
||||
streamID uint32
|
||||
increment uint32
|
||||
}
|
||||
|
||||
func (*incomingWindowUpdate) isTransportResponseFrame() bool { return false }
|
||||
|
||||
type outgoingWindowUpdate struct {
|
||||
throttledItem
|
||||
streamID uint32
|
||||
increment uint32
|
||||
}
|
||||
|
||||
func (*outgoingWindowUpdate) isTransportResponseFrame() bool {
|
||||
return false // window updates are throttled by thresholds
|
||||
}
|
||||
|
||||
type incomingSettings struct {
|
||||
throttledItem
|
||||
ss []http2.Setting
|
||||
}
|
||||
|
||||
func (*incomingSettings) isTransportResponseFrame() bool { return true } // Results in a settings ACK
|
||||
|
||||
type outgoingSettings struct {
|
||||
throttledItem
|
||||
ss []http2.Setting
|
||||
}
|
||||
|
||||
func (*outgoingSettings) isTransportResponseFrame() bool { return false }
|
||||
|
||||
type incomingGoAway struct {
|
||||
throttledItem
|
||||
}
|
||||
|
||||
func (*incomingGoAway) isTransportResponseFrame() bool { return false }
|
||||
|
||||
type goAway struct {
|
||||
throttledItem
|
||||
code http2.ErrCode
|
||||
debugData []byte
|
||||
headsUp bool
|
||||
closeConn error // if set, loopyWriter will exit with this error
|
||||
}
|
||||
|
||||
func (*goAway) isTransportResponseFrame() bool { return false }
|
||||
|
||||
type ping struct {
|
||||
throttledItem
|
||||
ack bool
|
||||
data [8]byte
|
||||
}
|
||||
|
||||
func (*ping) isTransportResponseFrame() bool { return true }
|
||||
|
||||
type outFlowControlSizeRequest struct {
|
||||
throttledItem
|
||||
resp chan uint32
|
||||
}
|
||||
|
||||
func (*outFlowControlSizeRequest) isTransportResponseFrame() bool { return false }
|
||||
|
||||
// closeConnection is an instruction to tell the loopy writer to flush the
|
||||
// framer and exit, which will cause the transport's connection to be closed
|
||||
// (by the client or server). The transport itself will close after the reader
|
||||
// encounters the EOF caused by the connection closure.
|
||||
type closeConnection struct{}
|
||||
|
||||
func (closeConnection) isTransportResponseFrame() bool { return false }
|
||||
type closeConnection struct {
|
||||
throttledItem
|
||||
}
|
||||
|
||||
type outStreamState int
|
||||
|
||||
@@ -379,9 +379,9 @@ func (c *controlBuffer) executeAndPut(f func() bool, it cbItem) (bool, error) {
|
||||
c.consumerWaiting = false
|
||||
}
|
||||
c.list.enqueue(it)
|
||||
if it.isTransportResponseFrame() {
|
||||
if it.isThrottled() {
|
||||
c.transportResponseFrames++
|
||||
if c.transportResponseFrames == maxQueuedTransportResponseFrames {
|
||||
if c.transportResponseFrames == maxQueuedControlBufferItems {
|
||||
// We are adding the frame that puts us over the threshold; create
|
||||
// a throttling channel.
|
||||
ch := make(chan struct{})
|
||||
@@ -436,8 +436,8 @@ func (c *controlBuffer) getOnceLocked() (any, error) {
|
||||
return nil, nil
|
||||
}
|
||||
h := c.list.dequeue().(cbItem)
|
||||
if h.isTransportResponseFrame() {
|
||||
if c.transportResponseFrames == maxQueuedTransportResponseFrames {
|
||||
if h.isThrottled() {
|
||||
if c.transportResponseFrames == maxQueuedControlBufferItems {
|
||||
// We are removing the frame that put us over the
|
||||
// threshold; close and clear the throttling channel.
|
||||
ch := c.trfChan.Swap(nil)
|
||||
@@ -464,10 +464,8 @@ func (c *controlBuffer) finish() {
|
||||
// is still not aware of these yet.
|
||||
for head := c.list.dequeueAll(); head != nil; head = head.next {
|
||||
switch v := head.it.(type) {
|
||||
case *headerFrame:
|
||||
if v.onOrphaned != nil { // It will be nil on the server-side.
|
||||
v.onOrphaned(ErrConnClosing)
|
||||
}
|
||||
case *clientHeaders:
|
||||
v.onOrphaned(ErrConnClosing)
|
||||
case *dataFrame:
|
||||
if !v.processing {
|
||||
v.data.Free()
|
||||
@@ -680,42 +678,38 @@ func (l *loopyWriter) registerStreamHandler(h *registerStream) {
|
||||
l.estdStreams[h.streamID] = str
|
||||
}
|
||||
|
||||
func (l *loopyWriter) headerHandler(h *headerFrame) error {
|
||||
if l.side == serverSide {
|
||||
str, ok := l.estdStreams[h.streamID]
|
||||
if !ok {
|
||||
if l.logger.V(logLevel) {
|
||||
l.logger.Infof("Unrecognized streamID %d in loopyWriter", h.streamID)
|
||||
}
|
||||
return nil
|
||||
func (l *loopyWriter) serverHeaderHandler(hdr *serverHeaders) error {
|
||||
str, ok := l.estdStreams[hdr.streamID]
|
||||
if !ok {
|
||||
if l.logger.V(logLevel) {
|
||||
l.logger.Infof("Unrecognized streamID %d in loopyWriter", hdr.streamID)
|
||||
}
|
||||
// Case 1.A: Server is responding back with headers.
|
||||
if !h.endStream {
|
||||
return l.writeHeader(h.streamID, h.endStream, h.hf, h.onWrite)
|
||||
}
|
||||
// else: Case 1.B: Server wants to close stream.
|
||||
return nil
|
||||
}
|
||||
|
||||
if str.state != empty { // either active or waiting on stream quota.
|
||||
// add it str's list of items.
|
||||
str.itl.enqueue(h)
|
||||
return nil
|
||||
}
|
||||
if err := l.writeHeader(h.streamID, h.endStream, h.hf, h.onWrite); err != nil {
|
||||
return err
|
||||
}
|
||||
return l.cleanupStreamHandler(h.cleanup)
|
||||
// Case 1: Server is responding back with headers.
|
||||
if !hdr.endStream {
|
||||
return l.writeHeader(hdr.streamID, hdr.endStream, hdr.hf, hdr.onWrite)
|
||||
}
|
||||
// Case 2: Client wants to originate stream.
|
||||
str := &outStream{
|
||||
id: h.streamID,
|
||||
state: empty,
|
||||
itl: &itemList{},
|
||||
wq: h.wq,
|
||||
|
||||
// Case 2: Server is closing the stream.
|
||||
if str.state != empty { // either active or waiting on stream quota.
|
||||
str.itl.enqueue(hdr)
|
||||
return nil
|
||||
}
|
||||
return l.originateStream(str, h)
|
||||
if err := l.writeHeader(hdr.streamID, hdr.endStream, hdr.hf, hdr.onWrite); err != nil {
|
||||
return err
|
||||
}
|
||||
return l.cleanupStreamHandler(hdr.cleanup)
|
||||
}
|
||||
|
||||
func (l *loopyWriter) originateStream(str *outStream, hdr *headerFrame) error {
|
||||
func (l *loopyWriter) clientHeaderHandler(hdr *clientHeaders) error {
|
||||
str := &outStream{
|
||||
id: hdr.streamID,
|
||||
state: empty,
|
||||
itl: &itemList{},
|
||||
wq: hdr.wq,
|
||||
}
|
||||
// l.draining is set when handling GoAway. In which case, we want to avoid
|
||||
// creating new streams.
|
||||
if l.draining {
|
||||
@@ -726,7 +720,7 @@ func (l *loopyWriter) originateStream(str *outStream, hdr *headerFrame) error {
|
||||
if err := hdr.initStream(str.id); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := l.writeHeader(str.id, hdr.endStream, hdr.hf, hdr.onWrite); err != nil {
|
||||
if err := l.writeHeader(str.id, false, hdr.hf, hdr.onWrite); err != nil {
|
||||
return err
|
||||
}
|
||||
l.estdStreams[str.id] = str
|
||||
@@ -882,8 +876,10 @@ func (l *loopyWriter) handle(i any) error {
|
||||
return l.incomingSettingsHandler(i)
|
||||
case *outgoingSettings:
|
||||
return l.outgoingSettingsHandler(i)
|
||||
case *headerFrame:
|
||||
return l.headerHandler(i)
|
||||
case *clientHeaders:
|
||||
return l.clientHeaderHandler(i)
|
||||
case *serverHeaders:
|
||||
return l.serverHeaderHandler(i)
|
||||
case *registerStream:
|
||||
l.registerStreamHandler(i)
|
||||
case *cleanupStream:
|
||||
@@ -1022,7 +1018,7 @@ func (l *loopyWriter) processData() (bool, error) {
|
||||
func (l *loopyWriter) updateStreamAfterWrite(str *outStream) error {
|
||||
if str.itl.isEmpty() {
|
||||
str.state = empty
|
||||
} else if trailer, ok := str.itl.peek().(*headerFrame); ok { // the next item is trailers.
|
||||
} else if trailer, ok := str.itl.peek().(*serverHeaders); ok { // the next item is trailers.
|
||||
if err := l.writeHeader(trailer.streamID, trailer.endStream, trailer.hf, trailer.onWrite); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+7
-5
@@ -806,9 +806,8 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr, handler s
|
||||
close(s.headerChan)
|
||||
}
|
||||
}
|
||||
hdr := &headerFrame{
|
||||
hf: headerFields,
|
||||
endStream: false,
|
||||
hdr := &clientHeaders{
|
||||
hf: headerFields,
|
||||
initStream: func(uint32) error {
|
||||
t.mu.Lock()
|
||||
// TODO: handle transport closure in loopy instead and remove this
|
||||
@@ -1251,7 +1250,10 @@ func (t *http2Client) handleData(f *parsedDataFrame) {
|
||||
dataLen := f.data.Len()
|
||||
if f.Header().Flags.Has(http2.FlagDataPadded) {
|
||||
if w := s.fc.onRead(size - uint32(dataLen)); w > 0 {
|
||||
t.controlBuf.put(&outgoingWindowUpdate{s.id, w})
|
||||
t.controlBuf.put(&outgoingWindowUpdate{
|
||||
streamID: s.id,
|
||||
increment: w,
|
||||
})
|
||||
}
|
||||
}
|
||||
if dataLen > 0 {
|
||||
@@ -1879,7 +1881,7 @@ func (t *http2Client) getOutFlowWindow() int64 {
|
||||
resp := make(chan uint32, 1)
|
||||
timer := time.NewTimer(time.Second)
|
||||
defer timer.Stop()
|
||||
t.controlBuf.put(&outFlowControlSizeRequest{resp})
|
||||
t.controlBuf.put(&outFlowControlSizeRequest{resp: resp})
|
||||
select {
|
||||
case sz := <-resp:
|
||||
return int64(sz)
|
||||
|
||||
+8
-5
@@ -810,7 +810,10 @@ func (t *http2Server) handleData(f *parsedDataFrame) {
|
||||
dataLen := f.data.Len()
|
||||
if f.Header().Flags.Has(http2.FlagDataPadded) {
|
||||
if w := s.fc.onRead(size - uint32(dataLen)); w > 0 {
|
||||
t.controlBuf.put(&outgoingWindowUpdate{s.id, w})
|
||||
t.controlBuf.put(&outgoingWindowUpdate{
|
||||
streamID: s.id,
|
||||
increment: w,
|
||||
})
|
||||
}
|
||||
}
|
||||
if dataLen > 0 {
|
||||
@@ -1047,7 +1050,7 @@ func (t *http2Server) writeHeaderLocked(s *ServerStream) error {
|
||||
headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-encoding", Value: s.sendCompress})
|
||||
}
|
||||
headerFields = appendHeaderFieldsFromMD(headerFields, s.header)
|
||||
hf := &headerFrame{
|
||||
hf := &serverHeaders{
|
||||
streamID: s.id,
|
||||
hf: headerFields,
|
||||
endStream: false,
|
||||
@@ -1115,7 +1118,7 @@ func (t *http2Server) writeStatus(s *ServerStream, st *status.Status) error {
|
||||
|
||||
// Attach the trailer metadata.
|
||||
headerFields = appendHeaderFieldsFromMD(headerFields, s.trailer)
|
||||
trailingHeader := &headerFrame{
|
||||
trailingHeader := &serverHeaders{
|
||||
streamID: s.id,
|
||||
hf: headerFields,
|
||||
endStream: true,
|
||||
@@ -1325,7 +1328,7 @@ func (t *http2Server) deleteStream(s *ServerStream, eosReceived bool) {
|
||||
}
|
||||
|
||||
// finishStream closes the stream and puts the trailing headerFrame into controlbuf.
|
||||
func (t *http2Server) finishStream(s *ServerStream, rst bool, rstCode http2.ErrCode, hdr *headerFrame, eosReceived bool) {
|
||||
func (t *http2Server) finishStream(s *ServerStream, rst bool, rstCode http2.ErrCode, hdr *serverHeaders, eosReceived bool) {
|
||||
// In case stream sending and receiving are invoked in separate
|
||||
// goroutines (e.g., bi-directional streaming), cancel needs to be
|
||||
// called to interrupt the potential blocking on other goroutines.
|
||||
@@ -1464,7 +1467,7 @@ func (t *http2Server) getOutFlowWindow() int64 {
|
||||
resp := make(chan uint32, 1)
|
||||
timer := time.NewTimer(time.Second)
|
||||
defer timer.Stop()
|
||||
t.controlBuf.put(&outFlowControlSizeRequest{resp})
|
||||
t.controlBuf.put(&outFlowControlSizeRequest{resp: resp})
|
||||
select {
|
||||
case sz := <-resp:
|
||||
return int64(sz)
|
||||
|
||||
+1
-1
@@ -19,4 +19,4 @@
|
||||
package grpc
|
||||
|
||||
// Version is the current grpc version.
|
||||
const Version = "1.82.0"
|
||||
const Version = "1.82.1"
|
||||
Vendored
+15
-15
@@ -157,7 +157,7 @@ github.com/aws/aws-sdk-go/service/sts/stsiface
|
||||
# github.com/bbalet/stopwords v1.0.0
|
||||
## explicit
|
||||
github.com/bbalet/stopwords
|
||||
# github.com/beevik/etree v1.6.0
|
||||
# github.com/beevik/etree v1.7.0
|
||||
## explicit; go 1.23.0
|
||||
github.com/beevik/etree
|
||||
# github.com/beorn7/perks v1.0.1
|
||||
@@ -327,7 +327,7 @@ github.com/cloudflare/circl/math/mlsbset
|
||||
github.com/cloudflare/circl/sign
|
||||
github.com/cloudflare/circl/sign/ed25519
|
||||
github.com/cloudflare/circl/sign/ed448
|
||||
# github.com/coreos/go-oidc/v3 v3.19.0
|
||||
# github.com/coreos/go-oidc/v3 v3.20.0
|
||||
## explicit; go 1.25.0
|
||||
github.com/coreos/go-oidc/v3/oidc
|
||||
# github.com/coreos/go-semver v0.3.1
|
||||
@@ -465,10 +465,10 @@ github.com/ggwhite/go-masker
|
||||
## explicit; go 1.25.0
|
||||
github.com/go-acme/lego/v4/acme
|
||||
github.com/go-acme/lego/v4/challenge
|
||||
# github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667
|
||||
# github.com/go-asn1-ber/asn1-ber v1.5.8
|
||||
## explicit; go 1.13
|
||||
github.com/go-asn1-ber/asn1-ber
|
||||
# github.com/go-chi/chi/v5 v5.3.0
|
||||
# github.com/go-chi/chi/v5 v5.3.1
|
||||
## explicit; go 1.23
|
||||
github.com/go-chi/chi/v5
|
||||
github.com/go-chi/chi/v5/middleware
|
||||
@@ -556,8 +556,8 @@ github.com/go-jose/go-jose/v4/json
|
||||
## explicit; go 1.17
|
||||
github.com/go-kit/log
|
||||
github.com/go-kit/log/level
|
||||
# github.com/go-ldap/ldap/v3 v3.4.13
|
||||
## explicit; go 1.24.0
|
||||
# github.com/go-ldap/ldap/v3 v3.4.14
|
||||
## explicit; go 1.25.0
|
||||
github.com/go-ldap/ldap/v3
|
||||
# github.com/go-ldap/ldif v0.0.0-20200320164324-fd88d9b715b3
|
||||
## explicit; go 1.14
|
||||
@@ -888,7 +888,7 @@ github.com/kovidgoyal/go-parallel
|
||||
# github.com/kovidgoyal/go-shm v1.0.0
|
||||
## explicit; go 1.24.0
|
||||
github.com/kovidgoyal/go-shm
|
||||
# github.com/kovidgoyal/imaging v1.8.22
|
||||
# github.com/kovidgoyal/imaging v1.8.23
|
||||
## explicit; go 1.25.0
|
||||
github.com/kovidgoyal/imaging
|
||||
github.com/kovidgoyal/imaging/apng
|
||||
@@ -2243,7 +2243,7 @@ go.yaml.in/yaml/v2
|
||||
# go.yaml.in/yaml/v3 v3.0.4
|
||||
## explicit; go 1.16
|
||||
go.yaml.in/yaml/v3
|
||||
# golang.org/x/crypto v0.53.0
|
||||
# golang.org/x/crypto v0.54.0
|
||||
## explicit; go 1.25.0
|
||||
golang.org/x/crypto/argon2
|
||||
golang.org/x/crypto/bcrypt
|
||||
@@ -2279,7 +2279,7 @@ golang.org/x/exp/slices
|
||||
golang.org/x/exp/slog
|
||||
golang.org/x/exp/slog/internal
|
||||
golang.org/x/exp/slog/internal/buffer
|
||||
# golang.org/x/image v0.43.0
|
||||
# golang.org/x/image v0.44.0
|
||||
## explicit; go 1.25.0
|
||||
golang.org/x/image/bmp
|
||||
golang.org/x/image/ccitt
|
||||
@@ -2301,7 +2301,7 @@ golang.org/x/image/webp
|
||||
golang.org/x/mod/internal/lazyregexp
|
||||
golang.org/x/mod/module
|
||||
golang.org/x/mod/semver
|
||||
# golang.org/x/net v0.56.0
|
||||
# golang.org/x/net v0.57.0
|
||||
## explicit; go 1.25.0
|
||||
golang.org/x/net/bpf
|
||||
golang.org/x/net/context
|
||||
@@ -2330,12 +2330,12 @@ golang.org/x/net/trace
|
||||
## explicit; go 1.25.0
|
||||
golang.org/x/oauth2
|
||||
golang.org/x/oauth2/internal
|
||||
# golang.org/x/sync v0.21.0
|
||||
# golang.org/x/sync v0.22.0
|
||||
## explicit; go 1.25.0
|
||||
golang.org/x/sync/errgroup
|
||||
golang.org/x/sync/semaphore
|
||||
golang.org/x/sync/singleflight
|
||||
# golang.org/x/sys v0.46.0
|
||||
# golang.org/x/sys v0.47.0
|
||||
## explicit; go 1.25.0
|
||||
golang.org/x/sys/cpu
|
||||
golang.org/x/sys/execabs
|
||||
@@ -2346,10 +2346,10 @@ golang.org/x/sys/windows/registry
|
||||
golang.org/x/sys/windows/svc
|
||||
golang.org/x/sys/windows/svc/eventlog
|
||||
golang.org/x/sys/windows/svc/mgr
|
||||
# golang.org/x/term v0.44.0
|
||||
# golang.org/x/term v0.45.0
|
||||
## explicit; go 1.25.0
|
||||
golang.org/x/term
|
||||
# golang.org/x/text v0.39.0
|
||||
# golang.org/x/text v0.40.0
|
||||
## explicit; go 1.25.0
|
||||
golang.org/x/text/cases
|
||||
golang.org/x/text/encoding
|
||||
@@ -2415,7 +2415,7 @@ google.golang.org/genproto/googleapis/api/httpbody
|
||||
## explicit; go 1.25.0
|
||||
google.golang.org/genproto/googleapis/rpc/errdetails
|
||||
google.golang.org/genproto/googleapis/rpc/status
|
||||
# google.golang.org/grpc v1.82.0
|
||||
# google.golang.org/grpc v1.82.1
|
||||
## explicit; go 1.25.0
|
||||
google.golang.org/grpc
|
||||
google.golang.org/grpc/attributes
|
||||
|
||||
+3
-3
@@ -72,7 +72,7 @@
|
||||
"pino": "10.1.0",
|
||||
"pino-pretty": "13.1.2",
|
||||
"prettier": "^3.6.2",
|
||||
"qs": "6.14.2",
|
||||
"qs": "6.15.2",
|
||||
"requirejs": "2.3.7",
|
||||
"rollup-plugin-gzip": "^4.1.1",
|
||||
"rollup-plugin-visualizer": "6.0.5",
|
||||
@@ -109,9 +109,9 @@
|
||||
"@xmldom/xmldom": "0.8.13",
|
||||
"flatted": "3.4.2",
|
||||
"form-data": "4.0.6",
|
||||
"immutable": "5.1.5",
|
||||
"immutable": "5.1.8",
|
||||
"js-cookie": "3.0.7",
|
||||
"linkify-it": "5.0.1",
|
||||
"linkify-it": "5.0.2",
|
||||
"minimatch@>=9.0.0 <9.0.7": "9.0.7",
|
||||
"ws": "8.21.0"
|
||||
},
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
"portal-vue": "^3.0.0",
|
||||
"prettier": "^3.8.1",
|
||||
"prismjs": "^1.30.0",
|
||||
"qs": "^6.14.1",
|
||||
"qs": "^6.15.2",
|
||||
"screenfull": "^6.0.2",
|
||||
"uuid": "^14.0.0",
|
||||
"vue-concurrency": "^5.0.3",
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"pinia": "3.0.4",
|
||||
"portal-vue": "3.0.0",
|
||||
"promise": "^8.3.0",
|
||||
"qs": "6.14.2",
|
||||
"qs": "6.15.2",
|
||||
"semver": "7.7.4",
|
||||
"utf8": "^3.0.0",
|
||||
"uuid": "14.0.0",
|
||||
|
||||
Generated
+110
-108
@@ -12,9 +12,9 @@ overrides:
|
||||
'@xmldom/xmldom': 0.8.13
|
||||
flatted: 3.4.2
|
||||
form-data: 4.0.6
|
||||
immutable: 5.1.5
|
||||
immutable: 5.1.8
|
||||
js-cookie: 3.0.7
|
||||
linkify-it: 5.0.1
|
||||
linkify-it: 5.0.2
|
||||
minimatch@>=9.0.0 <9.0.7: 9.0.7
|
||||
ws: 8.21.0
|
||||
|
||||
@@ -114,10 +114,10 @@ importers:
|
||||
version: 4.12.1
|
||||
browserslist-to-esbuild:
|
||||
specifier: ^2.1.1
|
||||
version: 2.1.1(browserslist@4.28.6)
|
||||
version: 2.1.1(browserslist@4.28.7)
|
||||
browserslist-useragent-regexp:
|
||||
specifier: ^4.1.3
|
||||
version: 4.1.4(browserslist@4.28.6)
|
||||
version: 4.1.4(browserslist@4.28.7)
|
||||
commander:
|
||||
specifier: 14.0.2
|
||||
version: 14.0.2
|
||||
@@ -164,8 +164,8 @@ importers:
|
||||
specifier: ^3.6.2
|
||||
version: 3.9.6
|
||||
qs:
|
||||
specifier: 6.14.2
|
||||
version: 6.14.2
|
||||
specifier: 6.15.2
|
||||
version: 6.15.2
|
||||
requirejs:
|
||||
specifier: 2.3.7
|
||||
version: 2.3.7
|
||||
@@ -270,7 +270,7 @@ importers:
|
||||
version: 4.0.1(vue@3.5.29(typescript@5.9.3))
|
||||
vue-router:
|
||||
specifier: ^5.0.6
|
||||
version: 5.0.6(@vue/compiler-sfc@3.5.29)(esbuild@0.27.7)(pinia@3.0.4(typescript@5.9.3)(vue@3.5.29(typescript@5.9.3)))(rollup@4.62.2)(vite@7.3.5(@types/node@24.13.2)(sass@1.94.1)(terser@5.49.0)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3))(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.21))
|
||||
version: 5.0.6(@vue/compiler-sfc@3.5.29)(esbuild@0.27.7)(pinia@3.0.4(typescript@5.9.3)(vue@3.5.29(typescript@5.9.3)))(rollup@4.62.2)(vite@7.3.5(@types/node@24.13.2)(sass@1.94.1)(terser@5.49.0)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3))(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.22))
|
||||
vue-select:
|
||||
specifier: 4.0.0-beta.6
|
||||
version: 4.0.0-beta.6(patch_hash=3cffa7f2dfdb75bd1f98edbf4df29a19c6c0bcb7979a6dfe8610db0175c9e1ef)(vue@3.5.29(typescript@5.9.3))
|
||||
@@ -301,13 +301,13 @@ importers:
|
||||
version: 6.0.1(vite@7.3.5(@types/node@24.13.2)(sass@1.94.1)(terser@5.49.0)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3))
|
||||
autoprefixer:
|
||||
specifier: 10.4.22
|
||||
version: 10.4.22(postcss@8.5.21)
|
||||
version: 10.4.22(postcss@8.5.22)
|
||||
babel-core:
|
||||
specifier: 7.0.0-bridge.0
|
||||
version: 7.0.0-bridge.0(@babel/core@7.28.5)
|
||||
babel-loader:
|
||||
specifier: ^10.0.0
|
||||
version: 10.1.1(@babel/core@7.28.5)(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.21))
|
||||
version: 10.1.1(@babel/core@7.28.5)(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.22))
|
||||
babel-plugin-require-context-hook:
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0
|
||||
@@ -319,7 +319,7 @@ importers:
|
||||
version: 13.0.6
|
||||
mini-css-extract-plugin:
|
||||
specifier: ^2.9.4
|
||||
version: 2.10.2(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.21))
|
||||
version: 2.10.2(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.22))
|
||||
node-notifier:
|
||||
specifier: ^10.0.1
|
||||
version: 10.0.1
|
||||
@@ -328,13 +328,13 @@ importers:
|
||||
version: 7.1.0
|
||||
postcss-nested:
|
||||
specifier: ^7.0.2
|
||||
version: 7.0.2(postcss@8.5.21)
|
||||
version: 7.0.2(postcss@8.5.22)
|
||||
postcss-safe-parser:
|
||||
specifier: 7.0.1
|
||||
version: 7.0.1(postcss@8.5.21)
|
||||
version: 7.0.1(postcss@8.5.22)
|
||||
postcss-simple-vars:
|
||||
specifier: ^7.0.1
|
||||
version: 7.0.1(postcss@8.5.21)
|
||||
version: 7.0.1(postcss@8.5.22)
|
||||
process:
|
||||
specifier: ^0.11.10
|
||||
version: 0.11.10
|
||||
@@ -358,7 +358,7 @@ importers:
|
||||
version: 17.0.0(typescript@5.9.3)
|
||||
stylelint-config-sass-guidelines:
|
||||
specifier: ^12.1.0
|
||||
version: 12.1.0(postcss@8.5.21)(stylelint@17.0.0(typescript@5.9.3))
|
||||
version: 12.1.0(postcss@8.5.22)(stylelint@17.0.0(typescript@5.9.3))
|
||||
stylelint-config-standard:
|
||||
specifier: ^40.0.0
|
||||
version: 40.0.0(stylelint@17.0.0(typescript@5.9.3))
|
||||
@@ -373,7 +373,7 @@ importers:
|
||||
version: 0.11.4
|
||||
url-loader:
|
||||
specifier: ^4.1.1
|
||||
version: 4.1.1(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.21))
|
||||
version: 4.1.1(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.22))
|
||||
vite:
|
||||
specifier: ^7.3.5
|
||||
version: 7.3.5(@types/node@24.13.2)(sass@1.94.1)(terser@5.49.0)(yaml@2.9.0)
|
||||
@@ -602,7 +602,7 @@ importers:
|
||||
version: 3.0.4(typescript@5.9.3)(vue@3.5.29(typescript@5.9.3))
|
||||
qs:
|
||||
specifier: ^6.14.2
|
||||
version: 6.14.2
|
||||
version: 6.15.2
|
||||
uuid:
|
||||
specifier: 14.0.0
|
||||
version: 14.0.0
|
||||
@@ -1064,8 +1064,8 @@ importers:
|
||||
specifier: ^1.30.0
|
||||
version: 1.30.0
|
||||
qs:
|
||||
specifier: ^6.14.1
|
||||
version: 6.14.2
|
||||
specifier: ^6.15.2
|
||||
version: 6.15.2
|
||||
screenfull:
|
||||
specifier: ^6.0.2
|
||||
version: 6.0.2
|
||||
@@ -1198,8 +1198,8 @@ importers:
|
||||
specifier: ^8.3.0
|
||||
version: 8.3.0
|
||||
qs:
|
||||
specifier: 6.14.2
|
||||
version: 6.14.2
|
||||
specifier: 6.15.2
|
||||
version: 6.15.2
|
||||
semver:
|
||||
specifier: 7.7.4
|
||||
version: 7.7.4
|
||||
@@ -2219,9 +2219,9 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@eslint-community/eslint-utils@4.9.1':
|
||||
resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
'@eslint-community/eslint-utils@4.10.0':
|
||||
resolution: {integrity: sha512-rd6n9Sefya1R1Vd594TRwzeHq2VnmICbvh3jebyt1Hs/6OoCSYNVpjGRRsKSTwAq3SKl09w0AfRCU57hoDLmxg==}
|
||||
engines: {node: ^20.19.0 || ^22.13.0 || >=24}
|
||||
peerDependencies:
|
||||
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
|
||||
|
||||
@@ -3857,8 +3857,8 @@ packages:
|
||||
base64-js@1.5.1:
|
||||
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
|
||||
|
||||
baseline-browser-mapping@2.10.44:
|
||||
resolution: {integrity: sha512-T3ghW+sl/ZJ8w1v/yQx3qvJ9040DWoLBz8JT/CILbAKcFyG9b2MRe75v6W5uXjv6uH1lumK2Kv46y2zSkcej0Q==}
|
||||
baseline-browser-mapping@2.11.0:
|
||||
resolution: {integrity: sha512-oCu2wfipvX3AePSgmOuKkIywOu+8n9psz7hXYmk56ghpu3+7KzNIBopaOs4c9BrtdnTtW30unG9GTfHo7EwERQ==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
hasBin: true
|
||||
|
||||
@@ -3941,8 +3941,8 @@ packages:
|
||||
peerDependencies:
|
||||
browserslist: '>=4.0.0'
|
||||
|
||||
browserslist@4.28.6:
|
||||
resolution: {integrity: sha512-FQBYNK15VMslhLHpA7+n+n1GOlF1kId2xcCg7/j95f24AOF6VDYMNH4mFxF7KuaTdv627faazpOAjFzMrfJOUw==}
|
||||
browserslist@4.28.7:
|
||||
resolution: {integrity: sha512-JxV13hNrFxqjOc8alRbq9dK1MM79NEXYpma2B2J4wAtpWS5zIEIKqWPGCl7N4o7Uc7B7itylh7SuDujATRyyTw==}
|
||||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
||||
hasBin: true
|
||||
|
||||
@@ -4485,8 +4485,8 @@ packages:
|
||||
engines: {node: '>=0.12.18'}
|
||||
hasBin: true
|
||||
|
||||
electron-to-chromium@1.5.394:
|
||||
resolution: {integrity: sha512-Wmt2Gm0o8JWBuGgmc4XZ0u9s1RaCRqhxP47phplmfg04+qypTUurpeJGP45A7Fhv7jdrrVH44PLlR9qXo37cVQ==}
|
||||
electron-to-chromium@1.5.395:
|
||||
resolution: {integrity: sha512-7zt9Aw+SrmxLWLN0zhaTWZQiCdryLVrYTq5R7iZakLvi2UQPYMMsROYV/2qVCzMeCiSXHwKOU+sZ4zOVVlrtKA==}
|
||||
|
||||
elliptic@6.6.1:
|
||||
resolution: {integrity: sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==}
|
||||
@@ -4666,10 +4666,6 @@ packages:
|
||||
resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
eslint-visitor-keys@3.4.3:
|
||||
resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
|
||||
eslint-visitor-keys@4.2.1:
|
||||
resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
@@ -5167,8 +5163,8 @@ packages:
|
||||
immediate@3.0.6:
|
||||
resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==}
|
||||
|
||||
immutable@5.1.5:
|
||||
resolution: {integrity: sha512-t7xcm2siw+hlUM68I+UEOK+z84RzmN59as9DZ7P1l0994DKUWV7UXBMQZVxaoMSRQ+PBZbHCOoBt7a2wxOMt+A==}
|
||||
immutable@5.1.8:
|
||||
resolution: {integrity: sha512-TM5YqrGeTsVIPPpILzeqZ8D2Zc2TvNgSDi88zPF2a4cyqQdWV/wVWBDRDbNzzrLeRWScrFcOX9lW2iX6GOtUDw==}
|
||||
|
||||
import-fresh@3.3.1:
|
||||
resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==}
|
||||
@@ -5483,8 +5479,8 @@ packages:
|
||||
lines-and-columns@1.2.4:
|
||||
resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
|
||||
|
||||
linkify-it@5.0.1:
|
||||
resolution: {integrity: sha512-wVoTjP4Q6R0NW5hiZkVJaFZPWgtXfoGF+6LucL3/FtiNjmcHhYjEr5f1Kqjirc1nBW07J/ZuRFumqr2oqccEWg==}
|
||||
linkify-it@5.0.2:
|
||||
resolution: {integrity: sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==}
|
||||
|
||||
loader-runner@4.3.2:
|
||||
resolution: {integrity: sha512-DFEqQ3ihfS9blba08cLfYf1NRAIEm+dDjic073DRDc3/JspI/8wYmtDsHwd3+4hwvdxSK7PGaElfTmm0awWJ4w==}
|
||||
@@ -6239,8 +6235,8 @@ packages:
|
||||
postcss-value-parser@4.2.0:
|
||||
resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==}
|
||||
|
||||
postcss@8.5.21:
|
||||
resolution: {integrity: sha512-v4sDNP3fdNiWMfabO7OwOQdOX8TiQSztKyT1Wj0w+j7LDallJThJRBBBmzVGyYj0crMh7jlV4zepPkiNu9UwDQ==}
|
||||
postcss@8.5.22:
|
||||
resolution: {integrity: sha512-KBDEIpLrvpv16pp3K0Fw+UCoZfopFjjgeB+0tA/aaThfEE74kKDLrgg603YvOWJyg3+WYtyq3xYsQWsIyZlPqQ==}
|
||||
engines: {node: ^10 || ^12 || >=14}
|
||||
|
||||
preact@10.29.7:
|
||||
@@ -6312,6 +6308,10 @@ packages:
|
||||
resolution: {integrity: sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==}
|
||||
engines: {node: '>=0.6'}
|
||||
|
||||
qs@6.15.2:
|
||||
resolution: {integrity: sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==}
|
||||
engines: {node: '>=0.6'}
|
||||
|
||||
quansync@0.2.11:
|
||||
resolution: {integrity: sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==}
|
||||
|
||||
@@ -7634,7 +7634,7 @@ snapshots:
|
||||
dependencies:
|
||||
'@babel/compat-data': 7.29.7
|
||||
'@babel/helper-validator-option': 7.29.7
|
||||
browserslist: 4.28.6
|
||||
browserslist: 4.28.7
|
||||
lru-cache: 5.1.1
|
||||
semver: 6.3.1
|
||||
|
||||
@@ -8713,15 +8713,15 @@ snapshots:
|
||||
'@esbuild/win32-x64@0.27.7':
|
||||
optional: true
|
||||
|
||||
'@eslint-community/eslint-utils@4.9.1(eslint@9.39.1)':
|
||||
'@eslint-community/eslint-utils@4.10.0(eslint@9.39.1)':
|
||||
dependencies:
|
||||
eslint: 9.39.1
|
||||
eslint-visitor-keys: 3.4.3
|
||||
eslint-visitor-keys: 5.0.1
|
||||
|
||||
'@eslint-community/eslint-utils@4.9.1(eslint@9.39.5)':
|
||||
'@eslint-community/eslint-utils@4.10.0(eslint@9.39.5)':
|
||||
dependencies:
|
||||
eslint: 9.39.5
|
||||
eslint-visitor-keys: 3.4.3
|
||||
eslint-visitor-keys: 5.0.1
|
||||
|
||||
'@eslint-community/regexpp@4.12.2': {}
|
||||
|
||||
@@ -9642,7 +9642,7 @@ snapshots:
|
||||
'@csstools/css-tokenizer': 3.0.4
|
||||
'@csstools/media-query-list-parser': 3.0.1(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)
|
||||
is-plain-object: 5.0.0
|
||||
postcss: 8.5.21
|
||||
postcss: 8.5.22
|
||||
postcss-selector-parser: 6.1.4
|
||||
postcss-value-parser: 4.2.0
|
||||
style-search: 0.1.0
|
||||
@@ -9928,7 +9928,7 @@ snapshots:
|
||||
|
||||
'@typescript-eslint/utils@8.65.0(eslint@9.39.5)(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.9.1(eslint@9.39.5)
|
||||
'@eslint-community/eslint-utils': 4.10.0(eslint@9.39.5)
|
||||
'@typescript-eslint/scope-manager': 8.65.0
|
||||
'@typescript-eslint/types': 8.65.0
|
||||
'@typescript-eslint/typescript-estree': 8.65.0(typescript@5.9.3)
|
||||
@@ -10192,7 +10192,7 @@ snapshots:
|
||||
'@vue/shared': 3.5.29
|
||||
estree-walker: 2.0.2
|
||||
magic-string: 0.30.21
|
||||
postcss: 8.5.21
|
||||
postcss: 8.5.22
|
||||
source-map-js: 1.2.1
|
||||
|
||||
'@vue/compiler-ssr@3.5.29':
|
||||
@@ -10546,14 +10546,14 @@ snapshots:
|
||||
|
||||
atomic-sleep@1.0.0: {}
|
||||
|
||||
autoprefixer@10.4.22(postcss@8.5.21):
|
||||
autoprefixer@10.4.22(postcss@8.5.22):
|
||||
dependencies:
|
||||
browserslist: 4.28.6
|
||||
browserslist: 4.28.7
|
||||
caniuse-lite: 1.0.30001806
|
||||
fraction.js: 5.3.4
|
||||
normalize-range: 0.1.2
|
||||
picocolors: 1.1.1
|
||||
postcss: 8.5.21
|
||||
postcss: 8.5.22
|
||||
postcss-value-parser: 4.2.0
|
||||
|
||||
available-typed-arrays@1.0.7:
|
||||
@@ -10578,12 +10578,12 @@ snapshots:
|
||||
dependencies:
|
||||
'@babel/core': 7.28.5
|
||||
|
||||
babel-loader@10.1.1(@babel/core@7.28.5)(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.21)):
|
||||
babel-loader@10.1.1(@babel/core@7.28.5)(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.22)):
|
||||
dependencies:
|
||||
'@babel/core': 7.28.5
|
||||
find-up: 5.0.0
|
||||
optionalDependencies:
|
||||
webpack: 5.108.4(esbuild@0.27.7)(postcss@8.5.21)
|
||||
webpack: 5.108.4(esbuild@0.27.7)(postcss@8.5.22)
|
||||
|
||||
babel-plugin-polyfill-corejs2@0.4.17(@babel/core@7.28.5):
|
||||
dependencies:
|
||||
@@ -10625,7 +10625,7 @@ snapshots:
|
||||
|
||||
base64-js@1.5.1: {}
|
||||
|
||||
baseline-browser-mapping@2.10.44: {}
|
||||
baseline-browser-mapping@2.11.0: {}
|
||||
|
||||
bidi-js@1.0.3:
|
||||
dependencies:
|
||||
@@ -10712,27 +10712,27 @@ snapshots:
|
||||
dependencies:
|
||||
pako: 1.0.11
|
||||
|
||||
browserslist-to-esbuild@2.1.1(browserslist@4.28.6):
|
||||
browserslist-to-esbuild@2.1.1(browserslist@4.28.7):
|
||||
dependencies:
|
||||
browserslist: 4.28.6
|
||||
browserslist: 4.28.7
|
||||
meow: 13.2.0
|
||||
|
||||
browserslist-useragent-regexp@4.1.4(browserslist@4.28.6):
|
||||
browserslist-useragent-regexp@4.1.4(browserslist@4.28.7):
|
||||
dependencies:
|
||||
argue-cli: 2.1.0
|
||||
browserslist: 4.28.6
|
||||
browserslist: 4.28.7
|
||||
easy-table: 1.2.0
|
||||
picocolors: 1.1.1
|
||||
regexp-tree: 0.1.27
|
||||
ua-regexes-lite: 1.2.1
|
||||
|
||||
browserslist@4.28.6:
|
||||
browserslist@4.28.7:
|
||||
dependencies:
|
||||
baseline-browser-mapping: 2.10.44
|
||||
baseline-browser-mapping: 2.11.0
|
||||
caniuse-lite: 1.0.30001806
|
||||
electron-to-chromium: 1.5.394
|
||||
electron-to-chromium: 1.5.395
|
||||
node-releases: 2.0.51
|
||||
update-browserslist-db: 1.2.3(browserslist@4.28.6)
|
||||
update-browserslist-db: 1.2.3(browserslist@4.28.7)
|
||||
|
||||
buffer-from@1.1.2: {}
|
||||
|
||||
@@ -10925,7 +10925,7 @@ snapshots:
|
||||
|
||||
core-js-compat@3.49.0:
|
||||
dependencies:
|
||||
browserslist: 4.28.6
|
||||
browserslist: 4.28.7
|
||||
|
||||
core-js@3.49.0: {}
|
||||
|
||||
@@ -11317,7 +11317,7 @@ snapshots:
|
||||
dependencies:
|
||||
jake: 10.9.4
|
||||
|
||||
electron-to-chromium@1.5.394: {}
|
||||
electron-to-chromium@1.5.395: {}
|
||||
|
||||
elliptic@6.6.1:
|
||||
dependencies:
|
||||
@@ -11457,14 +11457,14 @@ snapshots:
|
||||
|
||||
eslint-plugin-es-x@7.8.0(eslint@9.39.5):
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.9.1(eslint@9.39.5)
|
||||
'@eslint-community/eslint-utils': 4.10.0(eslint@9.39.5)
|
||||
'@eslint-community/regexpp': 4.12.2
|
||||
eslint: 9.39.5
|
||||
eslint-compat-utils: 0.5.1(eslint@9.39.5)
|
||||
|
||||
eslint-plugin-n@17.24.0(eslint@9.39.5)(typescript@5.9.3):
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.9.1(eslint@9.39.5)
|
||||
'@eslint-community/eslint-utils': 4.10.0(eslint@9.39.5)
|
||||
enhanced-resolve: 5.24.3
|
||||
eslint: 9.39.5
|
||||
eslint-plugin-es-x: 7.8.0(eslint@9.39.5)
|
||||
@@ -11479,7 +11479,7 @@ snapshots:
|
||||
|
||||
eslint-plugin-promise@7.3.0(eslint@9.39.5):
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.9.1(eslint@9.39.5)
|
||||
'@eslint-community/eslint-utils': 4.10.0(eslint@9.39.5)
|
||||
eslint: 9.39.5
|
||||
|
||||
eslint-plugin-unused-imports@4.4.1(@typescript-eslint/eslint-plugin@8.65.0(@typescript-eslint/parser@8.65.0(eslint@9.39.5)(typescript@5.9.3))(eslint@9.39.5)(typescript@5.9.3))(eslint@9.39.5):
|
||||
@@ -11490,7 +11490,7 @@ snapshots:
|
||||
|
||||
eslint-plugin-vue@10.10.0(@typescript-eslint/parser@8.65.0(eslint@9.39.5)(typescript@5.9.3))(eslint@9.39.5)(vue-eslint-parser@10.4.1(eslint@9.39.5)):
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.9.1(eslint@9.39.5)
|
||||
'@eslint-community/eslint-utils': 4.10.0(eslint@9.39.5)
|
||||
eslint: 9.39.5
|
||||
natural-compare: 1.4.0
|
||||
nth-check: 2.1.1
|
||||
@@ -11529,15 +11529,13 @@ snapshots:
|
||||
|
||||
eslint-visitor-keys@2.1.0: {}
|
||||
|
||||
eslint-visitor-keys@3.4.3: {}
|
||||
|
||||
eslint-visitor-keys@4.2.1: {}
|
||||
|
||||
eslint-visitor-keys@5.0.1: {}
|
||||
|
||||
eslint@9.39.1:
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.9.1(eslint@9.39.1)
|
||||
'@eslint-community/eslint-utils': 4.10.0(eslint@9.39.1)
|
||||
'@eslint-community/regexpp': 4.12.2
|
||||
'@eslint/config-array': 0.21.2
|
||||
'@eslint/config-helpers': 0.4.2
|
||||
@@ -11576,7 +11574,7 @@ snapshots:
|
||||
|
||||
eslint@9.39.5:
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.9.1(eslint@9.39.5)
|
||||
'@eslint-community/eslint-utils': 4.10.0(eslint@9.39.5)
|
||||
'@eslint-community/regexpp': 4.12.2
|
||||
'@eslint/config-array': 0.21.2
|
||||
'@eslint/config-helpers': 0.4.2
|
||||
@@ -12086,7 +12084,7 @@ snapshots:
|
||||
|
||||
immediate@3.0.6: {}
|
||||
|
||||
immutable@5.1.5: {}
|
||||
immutable@5.1.8: {}
|
||||
|
||||
import-fresh@3.3.1:
|
||||
dependencies:
|
||||
@@ -12413,7 +12411,7 @@ snapshots:
|
||||
|
||||
lines-and-columns@1.2.4: {}
|
||||
|
||||
linkify-it@5.0.1:
|
||||
linkify-it@5.0.2:
|
||||
dependencies:
|
||||
uc.micro: 2.1.0
|
||||
|
||||
@@ -12539,7 +12537,7 @@ snapshots:
|
||||
dependencies:
|
||||
argparse: 2.0.1
|
||||
entities: 4.5.0
|
||||
linkify-it: 5.0.1
|
||||
linkify-it: 5.0.2
|
||||
mdurl: 2.0.0
|
||||
punycode.js: 2.3.1
|
||||
uc.micro: 2.1.0
|
||||
@@ -12676,11 +12674,11 @@ snapshots:
|
||||
|
||||
mimic-fn@2.1.0: {}
|
||||
|
||||
mini-css-extract-plugin@2.10.2(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.21)):
|
||||
mini-css-extract-plugin@2.10.2(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.22)):
|
||||
dependencies:
|
||||
schema-utils: 4.3.3
|
||||
tapable: 2.3.3
|
||||
webpack: 5.108.4(esbuild@0.27.7)(postcss@8.5.21)
|
||||
webpack: 5.108.4(esbuild@0.27.7)(postcss@8.5.22)
|
||||
|
||||
minimalistic-assert@1.0.1: {}
|
||||
|
||||
@@ -12708,16 +12706,16 @@ snapshots:
|
||||
|
||||
minimist@1.2.8: {}
|
||||
|
||||
minimizer-webpack-plugin@5.6.1(esbuild@0.27.7)(postcss@8.5.21)(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.21)):
|
||||
minimizer-webpack-plugin@5.6.1(esbuild@0.27.7)(postcss@8.5.22)(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.22)):
|
||||
dependencies:
|
||||
'@jridgewell/trace-mapping': 0.3.31
|
||||
jest-worker: 27.5.1
|
||||
schema-utils: 4.3.3
|
||||
terser: 5.49.0
|
||||
webpack: 5.108.4(esbuild@0.27.7)(postcss@8.5.21)
|
||||
webpack: 5.108.4(esbuild@0.27.7)(postcss@8.5.22)
|
||||
optionalDependencies:
|
||||
esbuild: 0.27.7
|
||||
postcss: 8.5.21
|
||||
postcss: 8.5.22
|
||||
|
||||
minimizer-webpack-plugin@5.6.1(esbuild@0.27.7)(webpack@5.108.4(esbuild@0.27.7)):
|
||||
dependencies:
|
||||
@@ -13145,20 +13143,20 @@ snapshots:
|
||||
|
||||
postcss-media-query-parser@0.2.3: {}
|
||||
|
||||
postcss-nested@7.0.2(postcss@8.5.21):
|
||||
postcss-nested@7.0.2(postcss@8.5.22):
|
||||
dependencies:
|
||||
postcss: 8.5.21
|
||||
postcss: 8.5.22
|
||||
postcss-selector-parser: 7.1.4
|
||||
|
||||
postcss-resolve-nested-selector@0.1.6: {}
|
||||
|
||||
postcss-safe-parser@7.0.1(postcss@8.5.21):
|
||||
postcss-safe-parser@7.0.1(postcss@8.5.22):
|
||||
dependencies:
|
||||
postcss: 8.5.21
|
||||
postcss: 8.5.22
|
||||
|
||||
postcss-scss@4.0.9(postcss@8.5.21):
|
||||
postcss-scss@4.0.9(postcss@8.5.22):
|
||||
dependencies:
|
||||
postcss: 8.5.21
|
||||
postcss: 8.5.22
|
||||
|
||||
postcss-selector-parser@6.1.4:
|
||||
dependencies:
|
||||
@@ -13170,13 +13168,13 @@ snapshots:
|
||||
cssesc: 3.0.0
|
||||
util-deprecate: 1.0.2
|
||||
|
||||
postcss-simple-vars@7.0.1(postcss@8.5.21):
|
||||
postcss-simple-vars@7.0.1(postcss@8.5.22):
|
||||
dependencies:
|
||||
postcss: 8.5.21
|
||||
postcss: 8.5.22
|
||||
|
||||
postcss-value-parser@4.2.0: {}
|
||||
|
||||
postcss@8.5.21:
|
||||
postcss@8.5.22:
|
||||
dependencies:
|
||||
nanoid: 3.3.16
|
||||
picocolors: 1.1.1
|
||||
@@ -13238,6 +13236,10 @@ snapshots:
|
||||
dependencies:
|
||||
side-channel: 1.1.1
|
||||
|
||||
qs@6.15.2:
|
||||
dependencies:
|
||||
side-channel: 1.1.1
|
||||
|
||||
quansync@0.2.11: {}
|
||||
|
||||
querystring-es3@0.2.1: {}
|
||||
@@ -13438,7 +13440,7 @@ snapshots:
|
||||
sass@1.94.1:
|
||||
dependencies:
|
||||
chokidar: 4.0.3
|
||||
immutable: 5.1.5
|
||||
immutable: 5.1.8
|
||||
source-map-js: 1.2.1
|
||||
optionalDependencies:
|
||||
'@parcel/watcher': 2.6.0
|
||||
@@ -13721,11 +13723,11 @@ snapshots:
|
||||
dependencies:
|
||||
stylelint: 17.0.0(typescript@5.9.3)
|
||||
|
||||
stylelint-config-sass-guidelines@12.1.0(postcss@8.5.21)(stylelint@17.0.0(typescript@5.9.3)):
|
||||
stylelint-config-sass-guidelines@12.1.0(postcss@8.5.22)(stylelint@17.0.0(typescript@5.9.3)):
|
||||
dependencies:
|
||||
'@stylistic/stylelint-plugin': 3.1.3(stylelint@17.0.0(typescript@5.9.3))
|
||||
postcss: 8.5.21
|
||||
postcss-scss: 4.0.9(postcss@8.5.21)
|
||||
postcss: 8.5.22
|
||||
postcss-scss: 4.0.9(postcss@8.5.22)
|
||||
stylelint: 17.0.0(typescript@5.9.3)
|
||||
stylelint-scss: 6.14.0(stylelint@17.0.0(typescript@5.9.3))
|
||||
|
||||
@@ -13777,8 +13779,8 @@ snapshots:
|
||||
micromatch: 4.0.8
|
||||
normalize-path: 3.0.0
|
||||
picocolors: 1.1.1
|
||||
postcss: 8.5.21
|
||||
postcss-safe-parser: 7.0.1(postcss@8.5.21)
|
||||
postcss: 8.5.22
|
||||
postcss-safe-parser: 7.0.1(postcss@8.5.22)
|
||||
postcss-selector-parser: 7.1.4
|
||||
postcss-value-parser: 4.2.0
|
||||
string-width: 8.2.2
|
||||
@@ -14024,7 +14026,7 @@ snapshots:
|
||||
pathe: 2.0.3
|
||||
picomatch: 4.0.5
|
||||
|
||||
unplugin@3.3.0(esbuild@0.27.7)(rollup@4.62.2)(vite@7.3.5(@types/node@24.13.2)(sass@1.94.1)(terser@5.49.0)(yaml@2.9.0))(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.21)):
|
||||
unplugin@3.3.0(esbuild@0.27.7)(rollup@4.62.2)(vite@7.3.5(@types/node@24.13.2)(sass@1.94.1)(terser@5.49.0)(yaml@2.9.0))(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.22)):
|
||||
dependencies:
|
||||
'@jridgewell/remapping': 2.3.5
|
||||
picomatch: 4.0.5
|
||||
@@ -14033,7 +14035,7 @@ snapshots:
|
||||
esbuild: 0.27.7
|
||||
rollup: 4.62.2
|
||||
vite: 7.3.5(@types/node@24.13.2)(sass@1.94.1)(terser@5.49.0)(yaml@2.9.0)
|
||||
webpack: 5.108.4(esbuild@0.27.7)(postcss@8.5.21)
|
||||
webpack: 5.108.4(esbuild@0.27.7)(postcss@8.5.22)
|
||||
|
||||
unplugin@3.3.0(esbuild@0.27.7)(rollup@4.62.2)(vite@7.3.5(@types/node@24.13.2)(sass@1.94.1)(terser@5.49.0)(yaml@2.9.0))(webpack@5.108.4(esbuild@0.27.7)):
|
||||
dependencies:
|
||||
@@ -14046,9 +14048,9 @@ snapshots:
|
||||
vite: 7.3.5(@types/node@24.13.2)(sass@1.94.1)(terser@5.49.0)(yaml@2.9.0)
|
||||
webpack: 5.108.4(esbuild@0.27.7)
|
||||
|
||||
update-browserslist-db@1.2.3(browserslist@4.28.6):
|
||||
update-browserslist-db@1.2.3(browserslist@4.28.7):
|
||||
dependencies:
|
||||
browserslist: 4.28.6
|
||||
browserslist: 4.28.7
|
||||
escalade: 3.2.0
|
||||
picocolors: 1.1.1
|
||||
|
||||
@@ -14060,12 +14062,12 @@ snapshots:
|
||||
|
||||
url-join@5.0.0: {}
|
||||
|
||||
url-loader@4.1.1(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.21)):
|
||||
url-loader@4.1.1(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.22)):
|
||||
dependencies:
|
||||
loader-utils: 2.0.4
|
||||
mime-types: 2.1.35
|
||||
schema-utils: 3.3.0
|
||||
webpack: 5.108.4(esbuild@0.27.7)(postcss@8.5.21)
|
||||
webpack: 5.108.4(esbuild@0.27.7)(postcss@8.5.22)
|
||||
|
||||
url-parse@1.5.10:
|
||||
dependencies:
|
||||
@@ -14075,7 +14077,7 @@ snapshots:
|
||||
url@0.11.4:
|
||||
dependencies:
|
||||
punycode: 1.4.1
|
||||
qs: 6.14.2
|
||||
qs: 6.15.2
|
||||
|
||||
utf8@3.0.0: {}
|
||||
|
||||
@@ -14163,7 +14165,7 @@ snapshots:
|
||||
esbuild: 0.27.7
|
||||
fdir: 6.5.0(picomatch@4.0.5)
|
||||
picomatch: 4.0.5
|
||||
postcss: 8.5.21
|
||||
postcss: 8.5.22
|
||||
rollup: 4.62.2
|
||||
tinyglobby: 0.2.17
|
||||
optionalDependencies:
|
||||
@@ -14250,7 +14252,7 @@ snapshots:
|
||||
dependencies:
|
||||
vue: 3.5.29(typescript@5.9.3)
|
||||
|
||||
vue-router@5.0.6(@vue/compiler-sfc@3.5.29)(esbuild@0.27.7)(pinia@3.0.4(typescript@5.9.3)(vue@3.5.29(typescript@5.9.3)))(rollup@4.62.2)(vite@7.3.5(@types/node@24.13.2)(sass@1.94.1)(terser@5.49.0)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3))(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.21)):
|
||||
vue-router@5.0.6(@vue/compiler-sfc@3.5.29)(esbuild@0.27.7)(pinia@3.0.4(typescript@5.9.3)(vue@3.5.29(typescript@5.9.3)))(rollup@4.62.2)(vite@7.3.5(@types/node@24.13.2)(sass@1.94.1)(terser@5.49.0)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3))(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.22)):
|
||||
dependencies:
|
||||
'@babel/generator': 7.29.7
|
||||
'@vue-macros/common': 3.1.4(vue@3.5.29(typescript@5.9.3))
|
||||
@@ -14266,7 +14268,7 @@ snapshots:
|
||||
picomatch: 4.0.5
|
||||
scule: 1.3.0
|
||||
tinyglobby: 0.2.17
|
||||
unplugin: 3.3.0(esbuild@0.27.7)(rollup@4.62.2)(vite@7.3.5(@types/node@24.13.2)(sass@1.94.1)(terser@5.49.0)(yaml@2.9.0))(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.21))
|
||||
unplugin: 3.3.0(esbuild@0.27.7)(rollup@4.62.2)(vite@7.3.5(@types/node@24.13.2)(sass@1.94.1)(terser@5.49.0)(yaml@2.9.0))(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.22))
|
||||
unplugin-utils: 0.3.2
|
||||
vue: 3.5.29(typescript@5.9.3)
|
||||
yaml: 2.9.0
|
||||
@@ -14401,7 +14403,7 @@ snapshots:
|
||||
'@webassemblyjs/wasm-parser': 1.14.1
|
||||
acorn: 8.17.0
|
||||
acorn-import-phases: 1.0.4(acorn@8.17.0)
|
||||
browserslist: 4.28.6
|
||||
browserslist: 4.28.7
|
||||
chrome-trace-event: 1.0.4
|
||||
enhanced-resolve: 5.24.3
|
||||
es-module-lexer: 2.3.1
|
||||
@@ -14431,7 +14433,7 @@ snapshots:
|
||||
- uglify-js
|
||||
optional: true
|
||||
|
||||
webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.21):
|
||||
webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.22):
|
||||
dependencies:
|
||||
'@types/estree': 1.0.9
|
||||
'@types/json-schema': 7.0.15
|
||||
@@ -14440,7 +14442,7 @@ snapshots:
|
||||
'@webassemblyjs/wasm-parser': 1.14.1
|
||||
acorn: 8.17.0
|
||||
acorn-import-phases: 1.0.4(acorn@8.17.0)
|
||||
browserslist: 4.28.6
|
||||
browserslist: 4.28.7
|
||||
chrome-trace-event: 1.0.4
|
||||
enhanced-resolve: 5.24.3
|
||||
es-module-lexer: 2.3.1
|
||||
@@ -14449,7 +14451,7 @@ snapshots:
|
||||
graceful-fs: 4.2.11
|
||||
loader-runner: 4.3.2
|
||||
mime-db: 1.54.0
|
||||
minimizer-webpack-plugin: 5.6.1(esbuild@0.27.7)(postcss@8.5.21)(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.21))
|
||||
minimizer-webpack-plugin: 5.6.1(esbuild@0.27.7)(postcss@8.5.22)(webpack@5.108.4(esbuild@0.27.7)(postcss@8.5.22))
|
||||
neo-async: 2.6.2
|
||||
schema-utils: 4.3.3
|
||||
tapable: 2.3.3
|
||||
|
||||
Reference in new issue
Block a user