Compare commits

...

2 Commits

Author SHA1 Message Date
MengMengCode 39ccbad29a release: v1.1.29 2026-08-04 05:17:08 +08:00
MengMengCode a736e156bb fix something 2026-08-04 05:13:45 +08:00
5 changed files with 13 additions and 6 deletions
+6 -3
View File
@@ -16,6 +16,7 @@ const maxRedirects = 10
var blockedDownloadPrefixes = []netip.Prefix{ var blockedDownloadPrefixes = []netip.Prefix{
netip.MustParsePrefix("0.0.0.0/8"), netip.MustParsePrefix("0.0.0.0/8"),
netip.MustParsePrefix("100.100.100.200/32"),
netip.MustParsePrefix("127.0.0.0/8"), netip.MustParsePrefix("127.0.0.0/8"),
netip.MustParsePrefix("169.254.0.0/16"), netip.MustParsePrefix("169.254.0.0/16"),
netip.MustParsePrefix("192.0.0.0/24"), netip.MustParsePrefix("192.0.0.0/24"),
@@ -36,6 +37,7 @@ var blockedDownloadPrefixes = []netip.Prefix{
netip.MustParsePrefix("2001:db8::/32"), netip.MustParsePrefix("2001:db8::/32"),
netip.MustParsePrefix("2001:20::/28"), netip.MustParsePrefix("2001:20::/28"),
netip.MustParsePrefix("2002::/16"), netip.MustParsePrefix("2002::/16"),
netip.MustParsePrefix("fd00:ec2::254/128"),
netip.MustParsePrefix("fec0::/10"), netip.MustParsePrefix("fec0::/10"),
netip.MustParsePrefix("fe80::/10"), netip.MustParsePrefix("fe80::/10"),
netip.MustParsePrefix("ff00::/8"), netip.MustParsePrefix("ff00::/8"),
@@ -114,9 +116,10 @@ func Get(ctx context.Context, rawURL, userAgent string, timeout time.Duration) (
}, },
} }
// All URL components, redirects, DNS answers and dial destinations are // The URL, redirects, DNS answers and dial destinations are constrained
// constrained above and in restrictedTransport. // above and in restrictedTransport. CodeQL cannot infer those checks across
// lgtm[go/request-forgery] // the custom transport boundary.
// codeql[go/request-forgery]
return client.Do(request) return client.Do(request)
} }
@@ -18,6 +18,8 @@ func TestValidateURLRejectsUnsafeDestinations(t *testing.T) {
"http://127.0.0.1/image", "http://127.0.0.1/image",
"http://[::1]/image", "http://[::1]/image",
"http://169.254.169.254/latest/meta-data", "http://169.254.169.254/latest/meta-data",
"http://100.100.100.200/latest/meta-data",
"http://[fd00:ec2::254]/latest/meta-data",
"http://example.com:99999/image", "http://example.com:99999/image",
} { } {
if _, err := ValidateURL(rawURL); err == nil { if _, err := ValidateURL(rawURL); err == nil {
@@ -64,12 +66,14 @@ func TestIsAllowedDownloadAddress(t *testing.T) {
"172.16.0.1": true, "172.16.0.1": true,
"192.168.1.1": true, "192.168.1.1": true,
"169.254.169.254": false, "169.254.169.254": false,
"100.100.100.200": false,
"192.0.2.1": false, "192.0.2.1": false,
"198.18.0.1": false, "198.18.0.1": false,
"::1": false, "::1": false,
"64:ff9b::127.0.0.1": false, "64:ff9b::127.0.0.1": false,
"2002:7f00:1::1": false, "2002:7f00:1::1": false,
"fc00::1": true, "fc00::1": true,
"fd00:ec2::254": false,
"fec0::1": false, "fec0::1": false,
"fe80::1": false, "fe80::1": false,
"2001:db8::1": false, "2001:db8::1": false,
+1 -1
View File
@@ -1,7 +1,7 @@
package version package version
var ( var (
Version = "1.1.28" Version = "1.1.29"
Repo = "MengMengCode/CLICD" Repo = "MengMengCode/CLICD"
) )
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "clicd-frontend", "name": "clicd-frontend",
"private": true, "private": true,
"version": "1.1.28", "version": "1.1.29",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
+1 -1
View File
@@ -132,7 +132,7 @@ export default function Login() {
</form> </form>
</div> </div>
<p className="text-center text-xs text-gray-400 mt-6">CLICD v1.1.28</p> <p className="text-center text-xs text-gray-400 mt-6">CLICD v1.1.29</p>
</div> </div>
</div> </div>
) )