Skip to content

Commit 2ac5b8c

Browse files
Copilotbytemain
andauthored
Harden uv-build asset handling
Agent-Logs-Url: https://github.com/version-fox/vfox-python/sessions/016602d1-26fe-4323-9761-716964a16a9c Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>
1 parent cb7397c commit 2ac5b8c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/util.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,9 @@ local function uvBuildVersion(build)
363363
if build.display_version ~= nil then
364364
return build.display_version
365365
end
366+
if build.version == nil then
367+
return nil
368+
end
366369
if build.variant == "freethreaded" then
367370
return build.version .. "t"
368371
end
@@ -470,6 +473,10 @@ local function verifyUvBuildArchive(path, sha256)
470473
end
471474

472475
local function uvBuildDownloadUrl(build)
476+
if not isHttpsUrl(build.url) then
477+
error("Invalid uv-build download URL")
478+
end
479+
473480
local mirror = os.getenv(UV_BUILD_MIRROR_ENV)
474481
if mirror == nil or mirror == "" then
475482
return build.url

0 commit comments

Comments
 (0)