Skip to content

Commit 7645654

Browse files
committed
pkg/settings/cresettings: fix WASMBinarySizeLimit
1 parent e0b8677 commit 7645654

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

pkg/settings/cresettings/defaults.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"ExecutionResponseLimit": "100kb",
3131
"WASMExecutionTimeout": "1m0s",
3232
"WASMMemoryLimit": "100mb",
33-
"WASMBinarySizeLimit": "30mb",
33+
"WASMBinarySizeLimit": "100mb",
3434
"WASMCompressedBinarySizeLimit": "20mb",
3535
"WASMConfigSizeLimit": "30mb",
3636
"WASMSecretsSizeLimit": "30mb",

pkg/settings/cresettings/defaults.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ ExecutionTimeout = '10m0s'
3030
ExecutionResponseLimit = '100kb'
3131
WASMExecutionTimeout = '1m0s'
3232
WASMMemoryLimit = '100mb'
33-
WASMBinarySizeLimit = '30mb'
33+
WASMBinarySizeLimit = '100mb'
3434
WASMCompressedBinarySizeLimit = '20mb'
3535
WASMConfigSizeLimit = '30mb'
3636
WASMSecretsSizeLimit = '30mb'

pkg/settings/cresettings/settings.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ var Default = Schema{
7676
ExecutionResponseLimit: Size(100 * config.KByte),
7777
WASMExecutionTimeout: Duration(60 * time.Second),
7878
WASMMemoryLimit: Size(100 * config.MByte),
79-
WASMBinarySizeLimit: Size(30 * config.MByte),
79+
WASMBinarySizeLimit: Size(100 * config.MByte),
8080
WASMCompressedBinarySizeLimit: Size(20 * config.MByte),
8181
WASMConfigSizeLimit: Size(30 * config.MByte),
8282
WASMSecretsSizeLimit: Size(30 * config.MByte),

pkg/workflows/wasm/host/module.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ func NewModule(ctx context.Context, modCfg *ModuleConfig, binary []byte, opts ..
251251
// this is to prevent decompression bombs
252252
if err := modCfg.MaxCompressedBinaryLimiter.Check(ctx, config.SizeOf(binary)); err != nil {
253253
if errors.Is(err, limits.ErrorBoundLimited[config.Size]{}) {
254-
return nil, fmt.Errorf("compressed binary size exceeds the maximum allowed size of %d bytes: %w", modCfg.MaxCompressedBinarySize, err)
254+
return nil, fmt.Errorf("compressed binary size exceeds the maximum allowed size: %w", err)
255255
}
256256
return nil, fmt.Errorf("failed to check compressed binary size limit: %w", err)
257257
}
@@ -273,7 +273,7 @@ func NewModule(ctx context.Context, modCfg *ModuleConfig, binary []byte, opts ..
273273
// The Read() method will return io.EOF, and ReadAll will gracefully handle it and return nil.
274274
if err := modCfg.MaxDecompressedBinaryLimiter.Check(ctx, config.SizeOf(binary)); err != nil {
275275
if errors.Is(err, limits.ErrorBoundLimited[config.Size]{}) {
276-
return nil, fmt.Errorf("decompressed binary size reached the maximum allowed size of %d bytes: %w", modCfg.MaxDecompressedBinarySize, err)
276+
return nil, fmt.Errorf("decompressed binary size reached the maximum allowed size: %w", err)
277277
}
278278
return nil, fmt.Errorf("failed to check decompressed binary size limit: %w", err)
279279
}

0 commit comments

Comments
 (0)