Hi,

grrrr.

I guess as a quick fix you could assign a NULL_ACTION to the value parameter as part of a MULTI_DIMENSIONAL sanitizer.

Fortunately you caught me at a point where I was preparing a PR for the sanitizer due to a different regression error.

It would be nice to have a generic sanitizer for this case, and I may work on that, but for now I will probably just look at doing an ATTRIBUTES_VALUE sanitizer.

Watch this space :)



Quote Originally Posted by lat9 View Post
It turns out that the add-product handling from Edit Orders has some challenges fitting into the mold provided by the sanitizer, when attributes are involved.

If you look, for instance, at the demo product (Big Linked/Bug's Life ...) cPath=22&products_id=34. That product has multiple attributes, including one (the Gift Options checkboxes) that presents itself as an array. Here's a dump of the $_POST information coming back from an add of that product (pre-sanitization):
Code:
Array
(
    [securityToken] => 608c5b6efd7f704accd12713fa833510
    [id] => Array
        (
            [1] => Array
                (
                    [value] => 85
                    [type] => 2
                )

            [2] => Array
                (
                    [value] => 42
                    [type] => 0
                )

            [5] => Array
                (
                    [value] => 48
                    [type] => 0
                )

            [6] => Array
                (
                    [value] => 45
                    [type] => 0
                )

            [13] => Array
                (
                    [value] => Array
                        (
                            [63] => 63
                        )

                    [type] => 3
                )

            [10] => Array
                (
                    [value] => Here's a line of "text"
                    [type] => 1
                )

            [9] => Array
                (
                    [value] => 
                    [type] => 1
                )

            [11] => Array
                (
                    [value] => 
                    [type] => 1
                )

        )

    [add_product_categories_id] => 22
    [add_product_products_id] => 34
    [search] => 
    [step] => 4
)
So, the 'value' field of that attributes' list can be either a number, a collection of characters or an array! I'm not sure how to encode that currently; any guidance would be appreciated.