Skip to content

Commit 26484e5

Browse files
committed
Release 0.4.1
1 parent 751dd7e commit 26484e5

3 files changed

Lines changed: 21 additions & 5 deletions

File tree

includes/class-cart.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,19 @@ class PAPO_Cart
1919
{
2020
private const VERIFY_TIMEOUT_SECONDS = 5;
2121

22-
/** Guard against a hostile payload nesting itself into a stack overflow. */
23-
private const MAX_JSON_DEPTH = 12;
22+
/**
23+
* Guard against a hostile payload nesting itself into a stack overflow.
24+
*
25+
* 32, not lower: a real blueprint legitimately reaches depth 13 through
26+
* the admin bridge — {params} > config > sections > section > fields >
27+
* field > options > choice > priceModifiers > modifier > tiers > rows >
28+
* row > upTo — and inline Filecheck workflows and nested visibleWhen
29+
* groups go deeper still. A cap of 12 silently nulled the tier rows of
30+
* any option set with per-choice quantity tiers, and the backend then
31+
* refused the save ("Expected number, received null"). Hostile inputs
32+
* are still bounded; legitimate documents never come near 32.
33+
*/
34+
private const MAX_JSON_DEPTH = 32;
2435

2536
/**
2637
* Clean a json_decode()'d structure, key by key and leaf by leaf.

print-app-product-options-for-woocommerce.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Print.App Product Options for WooCommerce
44
* Plugin URI: https://options.print.app
55
* Description: Print product configurator for WooCommerce — options, live pricing, artwork upload. Prices are always re-verified server-side.
6-
* Version: 0.4.0
6+
* Version: 0.4.1
77
* Author: Print.App
88
* License: MIT
99
* Text Domain: print-app-product-options-for-woocommerce
@@ -15,7 +15,7 @@
1515
exit;
1616
}
1717

18-
define('PAPO_VERSION', '0.4.0');
18+
define('PAPO_VERSION', '0.4.1');
1919
define('PAPO_PLUGIN_FILE', __FILE__);
2020
define('PAPO_PLUGIN_DIR', plugin_dir_path(__FILE__));
2121
define('PAPO_PLUGIN_URL', plugin_dir_url(__FILE__));

readme.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: woocommerce, product options, printing, web-to-print, price calculator
44
Requires at least: 6.2
55
Tested up to: 7.0
66
Requires PHP: 7.4
7-
Stable tag: 0.4.0
7+
Stable tag: 0.4.1
88
License: MIT
99
License URI: https://opensource.org/licenses/MIT
1010

@@ -131,6 +131,11 @@ Yes, with no product or option limits.
131131

132132
== Changelog ==
133133

134+
= 0.4.1 =
135+
* Fix: option sets with quantity tiers on individual choices (for example
136+
size-dependent price breaks) could not be saved — the values were being
137+
truncated before they reached the server and the save was refused
138+
134139
= 0.4.0 =
135140
* The visual builder now ships with the plugin and runs on its own admin page
136141
instead of being embedded from options.print.app

0 commit comments

Comments
 (0)