webvas 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a2023d01aad96f20ed9938d18ddedf254edd56ba69c2dc0383a84d00c2efd03
4
- data.tar.gz: 4ad4fbd5919583226a281186a717d59eb038a0d1aac25e79716ccd8cc5775fb9
3
+ metadata.gz: 23e89d8e5afb08ea67551ec3be09d3481ba59795bb3580f3cde32c180a06f4c3
4
+ data.tar.gz: fb7dc400c269810d05ea2ad5ac186d8571bd54e521c0dc12d4aa169e674561e6
5
5
  SHA512:
6
- metadata.gz: 034c1b98ebf7a2607d8b985c21e63394ccca5b228bf99fc39dc74bb710ea6ae4e72b2ae13968e7b8108f3f3a71280c0119ab025290274d1b8b877b3bba3aeb78
7
- data.tar.gz: affd813bbbbf4ab437bfa794c5d56dd54187c27e4c6315bec9ad76b40bde5f9fae4dfa6941641e668f56f8a32506c40efe9c0e7983a5b5da32206a03209f1439
6
+ metadata.gz: 8c4d31e781969e8bf9bd441e655e794198fd9eff6ac79f80dfdc663dc82629d1d93b974bf13ba12a9fb825c0c96cd60ff71cbe139c0431165213ac46b99068bb
7
+ data.tar.gz: 23c452946ffeef36cde2e5dadbd6383b888419aed2dd52aa90be66e6294cf1ee94476ebfb0f41c9ed93acdb6b74016e42e3dc6281245faeb1a6eb543ad8d4620
data/CHANGELOG.md CHANGED
@@ -1,12 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.2] - 2026-09-26
4
+
5
+ ### Fixed
6
+
7
+ - Reject build output paths that resolve through symlinks into the project or its assets.
8
+
3
9
  ## [0.3.1] - 2026-09-25
4
10
 
5
11
  ### Fixed
6
12
 
7
- - Build the current WebAssembly runtime before browser tests and Pages deployment.
8
- - Include the CLI executable and runtime build inputs in the gem.
9
- - Require a Gesso release that supports browser sketches.
13
+ - Include the `webvas` command and runtime build files in the installed gem.
14
+ - Use the current WebAssembly runtime on the published playground.
15
+ - Install a Gesso version that supports browser sketches.
10
16
 
11
17
  ## [0.3.0] - 2026-09-25
12
18
 
data/lib/webvas/cli.rb CHANGED
@@ -100,11 +100,18 @@ module Webvas
100
100
 
101
101
  source = File.realpath(options[:root])
102
102
  destination = File.expand_path(options[:output], source)
103
- raise Error, "Build output cannot overwrite the project." if destination == source
104
- if destination == File.join(source, "assets") || destination.start_with?(File.join(source, "assets") + File::SEPARATOR)
103
+ ancestor = destination
104
+ suffix = []
105
+ until File.exist?(ancestor) || File.symlink?(ancestor)
106
+ ancestor, name = File.dirname(ancestor), File.basename(ancestor)
107
+ suffix.unshift(name)
108
+ end
109
+ resolved_destination = File.join(File.realpath(ancestor), *suffix)
110
+ raise Error, "Build output cannot overwrite the project." if resolved_destination == source
111
+ if resolved_destination == File.join(source, "assets") || resolved_destination.start_with?(File.join(source, "assets") + File::SEPARATOR)
105
112
  raise Error, "Build output cannot be inside the project's assets directory."
106
113
  end
107
- raise Error, "Build output cannot contain the project." if source.start_with?(destination + File::SEPARATOR)
114
+ raise Error, "Build output cannot contain the project." if source.start_with?(resolved_destination + File::SEPARATOR)
108
115
  raise Error, "Project is missing index.html or app.rb." unless %w[index.html app.rb].all? { |file| File.file?(File.join(source, file)) }
109
116
 
110
117
  FileUtils.mkdir_p(destination)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Webvas
4
- VERSION = "0.3.1"
4
+ VERSION = "0.3.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webvas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yudai Takada