Closed ben51degrees closed 6 months ago
@ben51degrees could you please also update the specification with these new details
As part of this work, the default will not be changed. The extra configuration options will be added, but the default will remain until the next version update as it is breaking.
@ben51degrees could you please also update the specification with these new details
I've added a PR for this change here.
Closed by #99
The
JavaScriptBuilderElement
currently has a build option namedEnableCookies
.This should be configurable per request, and should be disabled by default.
Summary of Steps
Disable by Default
Setting the option to disabled by default is a simple change to the
BUILDER_DEFAULT_ENABLE_COOKIES
constant.Per-Detection Configuration
To enable configuration per request, an additional evidence key of
query.fod-js-enable-cookies
should be added, and used in the same way as the existingquery.fod-js-object-name
. Usage of the existing option can be found starting on lines 667-673.Evidence Keys
The new evidence key
query.fod-js-enable-cookies
should be added to the evidence keys returned by the engine.Tests
Tests for this should be added, and include the following:
JavaScriptBuilderElement
, the generated JavaScript should not contain any JavaScript that adds cookie values,JavaSctiptBuilderElement
build withEnableCookies
set to true, the generated JavaScript should contain JavaScript that adds cookie values,JavaScriptBuilderElement
built withEnableCookies
set to each of the possible values, and an evidence value oftrue
for the keyquery.fod-js-enable-cookies
, the generated JavaScript should contain JavaScript that adds cookie values,JavaScriptBuilderElement
built withEnableCookies
set to each of the possible values, and an evidence value offalse
for the keyquery.fod-js-enable-cookies
, the generated JavaScript should not contain any JavaScript that adds cookie values,Documentation
Documentation should be added to the builder method to make it clear that it can also be configured per-detection.
The behavior of cookies, and whether or not they are written, should be thoroughly documented in the readme with the their options (pointing to external documentation where necessary).