• avecyev

    (@avecyev)


    Steps:
    – Go to the frontend.
    – Instead of accepting all, go to the privacy settings.
    – The privacy settings modal will open.
    – Enable a single, optional data processor.
    – Click accept.

    Verify:
    – Look at the “wpgdprc-consent-*” cookie.
    – all data processors are set to “declined”.

    Reason:
    1. AbstractAjax::validateData()
    – “json_decode( $data )” will decode the string as an array of integers — e.g. {“checked”:[3]}
    – “Helper::sanitizeStringArray( $data );” will sanitizes the data as an array of strings — e.g. {“checked”:[“3”]}

    2. ConsentCookie::buildResponse()
    – “in_array( $object->getId(), $data[‘checked’], true )” has the strict parameter enabled.
    – The condition will fail because “$object->getId()” is an integer and “$data[‘checked’]” is an array of strings.

  • The topic ‘Enabling single Data processors in Privacy settings will fail’ is closed to new replies.