@contrast/agent 4.5.2 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/agent-loader.js +1 -1
- package/bin/VERSION +1 -1
- package/bin/linux/contrast-service +0 -0
- package/bin/mac/contrast-service +0 -0
- package/bin/windows/contrast-service.exe +0 -0
- package/bootstrap.js +1 -1
- package/cli-rewriter.js +1 -1
- package/cli.js +1 -1
- package/esm.mjs +1 -1
- package/lib/agent-emitter.js +1 -1
- package/lib/agent.js +1 -1
- package/lib/app-info.js +1 -1
- package/lib/assess/deadzones/index.js +1 -1
- package/lib/assess/deadzones/rewrite.js +1 -1
- package/lib/assess/express/index.js +1 -1
- package/lib/assess/express/route-coverage.js +1 -1
- package/lib/assess/express/sinks/index.js +1 -1
- package/lib/assess/express/sinks/xss.js +1 -1
- package/lib/assess/express/sources.js +1 -1
- package/lib/assess/fastify/index.js +1 -1
- package/lib/assess/fastify/route-coverage.js +1 -1
- package/lib/assess/fastify/sinks/index.js +1 -1
- package/lib/assess/fastify/sinks/response-scanning.js +1 -1
- package/lib/assess/fastify/sinks/unvalidated-redirect.js +1 -1
- package/lib/assess/fastify/sinks/xss.js +1 -1
- package/lib/assess/fastify/sources.js +1 -1
- package/lib/assess/hapi/index.js +1 -1
- package/lib/assess/hapi/route-coverage.js +1 -1
- package/lib/assess/hapi/sinks/index.js +1 -1
- package/lib/assess/hapi/sinks/response-scanning.js +1 -1
- package/lib/assess/hapi/sinks/session.js +1 -1
- package/lib/assess/hapi/sinks/unvalidated-redirect.js +1 -1
- package/lib/assess/hapi/sinks/xss.js +1 -1
- package/lib/assess/hapi/sources.js +1 -1
- package/lib/assess/index.js +1 -1
- package/lib/assess/koa/index.js +1 -1
- package/lib/assess/koa/route-coverage.js +1 -1
- package/lib/assess/koa/sinks/index.js +1 -1
- package/lib/assess/koa/sinks/response-scanning.js +1 -1
- package/lib/assess/koa/sinks/unvalidated-redirect.js +1 -1
- package/lib/assess/koa/sinks/xss.js +1 -1
- package/lib/assess/koa/sources.js +1 -1
- package/lib/assess/loopback4/index.js +1 -1
- package/lib/assess/loopback4/route-coverage.js +1 -1
- package/lib/assess/loopback4/sinks/index.js +1 -1
- package/lib/assess/loopback4/sinks/response-scanning.js +1 -1
- package/lib/assess/loopback4/sinks/xss.js +1 -1
- package/lib/assess/loopback4/sources.js +1 -1
- package/lib/assess/membrane/debraner.js +1 -1
- package/lib/assess/membrane/deserialization-membrane.js +5 -6
- package/lib/assess/membrane/index.js +1 -1
- package/lib/assess/membrane/source-membrane.js +17 -34
- package/lib/assess/models/base-event.js +1 -1
- package/lib/assess/models/call-context.js +2 -2
- package/lib/assess/models/index.js +1 -1
- package/lib/assess/models/propagation-event.js +1 -1
- package/lib/assess/models/signature.js +1 -1
- package/lib/assess/models/sink-event.js +1 -1
- package/lib/assess/models/source-event.js +1 -1
- package/lib/assess/models/tag-range/index.js +1 -1
- package/lib/assess/models/tag-range/relationships.js +1 -1
- package/lib/assess/models/tag-range/util.js +1 -1
- package/lib/assess/policy/index.js +1 -1
- package/lib/assess/policy/init.js +1 -1
- package/lib/assess/policy/propagators.json +19 -21
- package/lib/assess/policy/rules.json +7 -2
- package/lib/assess/policy/signatures.json +42 -6
- package/lib/assess/policy/util.js +3 -2
- package/lib/assess/propagators/JSON/parse.js +2 -2
- package/lib/assess/propagators/JSON/stringify.js +4 -4
- package/lib/assess/propagators/ajv/conditionals.js +1 -1
- package/lib/assess/propagators/ajv/evaluator-shim.js +1 -1
- package/lib/assess/propagators/ajv/index.js +1 -1
- package/lib/assess/propagators/ajv/json-schema-type-evaluators.js +1 -1
- package/lib/assess/propagators/ajv/object-walk.js +1 -1
- package/lib/assess/propagators/ajv/refs.js +1 -1
- package/lib/assess/propagators/ajv/schema-context.js +1 -1
- package/lib/assess/propagators/array-prototype-join.js +8 -9
- package/lib/assess/propagators/common.js +8 -6
- package/lib/assess/propagators/dustjs/escape-html.js +22 -0
- package/lib/assess/propagators/dustjs/escape-js.js +22 -0
- package/lib/assess/propagators/ejs-template-generate-source.js +1 -1
- package/lib/assess/propagators/encode-uri/encode-uri-component.js +22 -0
- package/lib/assess/propagators/encode-uri/encode-uri.js +22 -0
- package/lib/assess/propagators/handlebars-compile.js +1 -1
- package/lib/assess/propagators/handlebars-escape-expresssion.js +2 -2
- package/lib/assess/propagators/index.js +1 -3
- package/lib/assess/propagators/joi/boolean.js +2 -2
- package/lib/assess/propagators/joi/expression.js +2 -2
- package/lib/assess/propagators/joi/index.js +1 -1
- package/lib/assess/propagators/joi/number.js +2 -2
- package/lib/assess/propagators/joi/string-base.js +2 -2
- package/lib/assess/propagators/joi/string-schema.js +13 -14
- package/lib/assess/propagators/joi/values.js +38 -23
- package/lib/assess/propagators/manager.js +13 -11
- package/lib/assess/propagators/mongoose/helpers.js +20 -0
- package/lib/assess/propagators/mongoose/index.js +18 -0
- package/lib/assess/propagators/mongoose/map.js +74 -0
- package/lib/assess/propagators/mongoose/string.js +104 -0
- package/lib/assess/propagators/mustache/escape.js +22 -0
- package/lib/assess/propagators/number.js +54 -0
- package/lib/assess/propagators/object.js +7 -8
- package/lib/assess/propagators/path/basename.js +15 -14
- package/lib/assess/propagators/path/common.js +2 -2
- package/lib/assess/propagators/path/dirname.js +15 -14
- package/lib/assess/propagators/path/extname.js +15 -14
- package/lib/assess/propagators/path/format.js +1 -1
- package/lib/assess/propagators/path/join.js +1 -1
- package/lib/assess/propagators/path/normalize.js +1 -1
- package/lib/assess/propagators/path/parse.js +2 -2
- package/lib/assess/propagators/path/relative.js +8 -6
- package/lib/assess/propagators/path/resolve.js +1 -1
- package/lib/assess/propagators/path/to-namespaced-path.js +1 -1
- package/lib/assess/propagators/pug-compile.js +1 -1
- package/lib/assess/propagators/querystring/escape.js +21 -19
- package/lib/assess/propagators/querystring/parse.js +8 -6
- package/lib/assess/propagators/querystring/stringify.js +26 -25
- package/lib/assess/propagators/querystring/unescape.js +21 -19
- package/lib/assess/propagators/querystring/utils.js +1 -1
- package/lib/assess/propagators/sequelize/sql-string-escape.js +2 -2
- package/lib/assess/propagators/sequelize/sql-string-format-named-parameters.js +2 -2
- package/lib/assess/propagators/sequelize/sql-string-format.js +4 -4
- package/lib/assess/propagators/sequelize/utils.js +3 -3
- package/lib/assess/propagators/string-prototype-replace.js +31 -29
- package/lib/assess/propagators/string-prototype-split.js +37 -37
- package/lib/assess/propagators/string-prototype-trim.js +16 -18
- package/lib/assess/propagators/string.js +13 -17
- package/lib/assess/propagators/template-escape.js +87 -0
- package/lib/assess/propagators/templates.js +11 -12
- package/lib/assess/propagators/url/url-prototype-parse.js +6 -7
- package/lib/assess/propagators/url/url-url.js +52 -44
- package/lib/assess/propagators/url/utils.js +1 -1
- package/lib/assess/propagators/util/format.js +2 -2
- package/lib/assess/propagators/utils.js +1 -1
- package/lib/assess/propagators/v8/init-hooks.js +4 -4
- package/lib/assess/propagators/validator/init-hooks.js +23 -23
- package/lib/assess/propagators/validator/validator-methods.js +1 -2
- package/lib/assess/response-scanning/app-activity.js +1 -1
- package/lib/assess/response-scanning/autocomplete-missing.js +1 -1
- package/lib/assess/response-scanning/cache-controls-missing.js +1 -1
- package/lib/assess/response-scanning/clickjacking-control-missing.js +1 -1
- package/lib/assess/response-scanning/common.js +1 -1
- package/lib/assess/response-scanning/cookies/common.js +1 -1
- package/lib/assess/response-scanning/cookies/events.js +1 -1
- package/lib/assess/response-scanning/cookies/httponly.js +1 -1
- package/lib/assess/response-scanning/cookies/secure-flag-missing.js +1 -1
- package/lib/assess/response-scanning/headers/csp-header-insecure.js +1 -1
- package/lib/assess/response-scanning/headers/csp-header-missing.js +1 -1
- package/lib/assess/response-scanning/headers/csp-utils.js +1 -1
- package/lib/assess/response-scanning/headers/hsts-header-missing.js +1 -1
- package/lib/assess/response-scanning/headers/powered-by.js +1 -1
- package/lib/assess/response-scanning/headers/xcontenttype-header-missing.js +1 -1
- package/lib/assess/response-scanning/headers/xxssprotection-header-disabled.js +1 -1
- package/lib/assess/response-scanning/parameter-pollution.js +1 -1
- package/lib/assess/response-scanning/parseable-response-emitter.js +1 -1
- package/lib/assess/restify/index.js +1 -1
- package/lib/assess/restify/route-coverage.js +1 -1
- package/lib/assess/restify/session.js +1 -1
- package/lib/assess/restify/sinks/index.js +1 -1
- package/lib/assess/restify/sinks/response-scanning.js +1 -1
- package/lib/assess/restify/sinks/unvalidated-redirect.js +1 -1
- package/lib/assess/restify/sinks/xss.js +1 -1
- package/lib/assess/restify/sources.js +1 -1
- package/lib/assess/sinks/common.js +11 -6
- package/lib/assess/sinks/dustjs-linkedin-xss.js +131 -0
- package/lib/assess/sinks/dynamo.js +1 -1
- package/lib/assess/sinks/hapi-16-xss.js +1 -1
- package/lib/assess/sinks/index.js +1 -1
- package/lib/assess/sinks/libxmljs-xxe.js +2 -2
- package/lib/assess/sinks/mongodb.js +3 -2
- package/lib/assess/sinks/ssrf-url.js +2 -2
- package/lib/assess/sources/formidable.js +1 -1
- package/lib/assess/sources/index.js +1 -1
- package/lib/assess/static/hardcoded.js +1 -1
- package/lib/assess/technologies/index.js +1 -1
- package/lib/assess/utils.js +1 -1
- package/lib/cli-rewriter/index.js +1 -1
- package/lib/constants.js +5 -2
- package/lib/contrast.js +1 -1
- package/lib/core/arch-components/dynamodb.js +1 -1
- package/lib/core/arch-components/dynamodbv3.js +1 -1
- package/lib/core/arch-components/index.js +1 -1
- package/lib/core/arch-components/mongodb.js +1 -1
- package/lib/core/arch-components/mysql.js +1 -1
- package/lib/core/arch-components/postgres.js +1 -1
- package/lib/core/arch-components/rethinkdb.js +53 -0
- package/lib/core/arch-components/sqlite3.js +1 -1
- package/lib/core/async-storage/context.js +1 -1
- package/lib/core/async-storage/hooks/bluebird.js +1 -1
- package/lib/core/async-storage/hooks/mongodb-core.js +1 -1
- package/lib/core/async-storage/hooks/mysql.js +1 -1
- package/lib/core/async-storage/hooks/redis.js +1 -1
- package/lib/core/async-storage/hooks/utils.js +1 -1
- package/lib/core/async-storage/index.js +1 -1
- package/lib/core/async-storage/scopes/index.js +1 -1
- package/lib/core/common/formidable.js +1 -1
- package/lib/core/common/index.js +1 -1
- package/lib/core/config/options.js +4 -3
- package/lib/core/config/util.js +1 -1
- package/lib/core/exclusions/exclusion-factory.js +1 -1
- package/lib/core/exclusions/exclusion.js +1 -1
- package/lib/core/exclusions/input.js +1 -1
- package/lib/core/exclusions/url.js +1 -1
- package/lib/core/express/index.js +1 -1
- package/lib/core/express/utils.js +1 -1
- package/lib/core/fastify/index.js +1 -1
- package/lib/core/fastify/utils.js +1 -1
- package/lib/core/hapi/index.js +1 -1
- package/lib/core/hapi/utils.js +1 -1
- package/lib/core/index.js +1 -1
- package/lib/core/koa/index.js +1 -1
- package/lib/core/koa/utils.js +1 -1
- package/lib/core/logger/daily-rotate-file.js +1 -1
- package/lib/core/logger/dataflow-monitor.js +1 -1
- package/lib/core/logger/debug-logger.js +1 -1
- package/lib/core/logger/index.js +1 -1
- package/lib/core/logger/perf-logger.js +1 -1
- package/lib/core/logger/umbrella-logger.js +1 -1
- package/lib/core/loopback4/index.js +1 -1
- package/lib/core/metrics/index.js +1 -1
- package/lib/core/restify/index.js +1 -1
- package/lib/core/restify/utils.js +1 -1
- package/lib/core/rewrite/assignment-expression.js +1 -1
- package/lib/core/rewrite/binary-expression.js +1 -1
- package/lib/core/rewrite/call-expression.js +1 -1
- package/lib/core/rewrite/callees.js +1 -1
- package/lib/core/rewrite/catch-clause.js +1 -1
- package/lib/core/rewrite/function-wrap.js +1 -1
- package/lib/core/rewrite/index.js +1 -1
- package/lib/core/rewrite/injections.js +9 -1
- package/lib/core/rewrite/is-contrast-method.js +1 -1
- package/lib/core/rewrite/log.js +1 -1
- package/lib/core/rewrite/member-expression.js +1 -1
- package/lib/core/rewrite/object-property.js +1 -1
- package/lib/core/rewrite/prepend-globals.js +1 -1
- package/lib/core/rewrite/rewrite-log.js +1 -1
- package/lib/core/rewrite/switch-statement.js +1 -1
- package/lib/core/rewrite/template-literal.js +1 -1
- package/lib/core/stacktrace.js +3 -2
- package/lib/coverage.js +1 -1
- package/lib/feature-set.js +2 -2
- package/lib/generator-function.js +1 -1
- package/lib/hooks/array.js +1 -1
- package/lib/hooks/cluster.js +1 -1
- package/lib/hooks/dataflow-monitor.js +1 -1
- package/lib/hooks/encoding.js +1 -1
- package/lib/hooks/express-fileupload.js +1 -1
- package/lib/hooks/express-session.js +1 -1
- package/lib/hooks/fn-to-string.js +1 -1
- package/lib/hooks/frameworks/base.js +9 -3
- package/lib/hooks/frameworks/common.js +1 -1
- package/lib/hooks/frameworks/hapi16.js +1 -1
- package/lib/hooks/frameworks/http.js +24 -17
- package/lib/hooks/frameworks/http2.js +73 -0
- package/lib/hooks/frameworks/index.js +9 -4
- package/lib/hooks/hapi-16-reply.js +1 -1
- package/lib/hooks/hapi-16-session.js +1 -1
- package/lib/hooks/http.js +113 -129
- package/lib/hooks/module/extensions.js +1 -1
- package/lib/hooks/module/helpers.js +1 -1
- package/lib/hooks/module/index.js +1 -1
- package/lib/hooks/newrelic.js +1 -1
- package/lib/hooks/object-is.js +1 -1
- package/lib/hooks/object-to-primitive.js +7 -8
- package/lib/hooks/patcher.js +62 -39
- package/lib/hooks/require.js +17 -23
- package/lib/hooks/stealthy-require.js +1 -1
- package/lib/instrumentation.js +1 -4
- package/lib/libraries.js +1 -1
- package/lib/library-usage.js +1 -1
- package/lib/list-installed.js +1 -1
- package/lib/protect/analysis/aho-corasick.js +1 -1
- package/lib/protect/analysis/dfsa-analyzer.js +1 -1
- package/lib/protect/errors/handler.js +1 -1
- package/lib/protect/errors/security-exception.js +1 -1
- package/lib/protect/express/index.js +1 -1
- package/lib/protect/express/sinks.js +1 -1
- package/lib/protect/express/sources.js +1 -1
- package/lib/protect/fastify/index.js +1 -1
- package/lib/protect/fastify/sinks.js +1 -1
- package/lib/protect/fastify/sources.js +1 -1
- package/lib/protect/hapi/error-handler.js +1 -1
- package/lib/protect/hapi/index.js +1 -1
- package/lib/protect/hapi/sinks.js +1 -1
- package/lib/protect/hapi/sources.js +1 -1
- package/lib/protect/index.js +1 -1
- package/lib/protect/input-analysis.js +1 -1
- package/lib/protect/koa/index.js +1 -1
- package/lib/protect/koa/sinks.js +1 -1
- package/lib/protect/koa/sources.js +1 -1
- package/lib/protect/listeners.js +1 -1
- package/lib/protect/loopback4/index.js +1 -1
- package/lib/protect/loopback4/sources.js +1 -1
- package/lib/protect/models/application-context.js +1 -1
- package/lib/protect/models/sink-event.js +1 -1
- package/lib/protect/models/source-event.js +1 -1
- package/lib/protect/restify/index.js +1 -1
- package/lib/protect/restify/sinks.js +1 -1
- package/lib/protect/restify/sources.js +1 -1
- package/lib/protect/rules/assessment.js +1 -1
- package/lib/protect/rules/attack-patterns.js +1 -1
- package/lib/protect/rules/base-scanner/index.js +1 -1
- package/lib/protect/rules/base-scanner/java-script-scanner.js +1 -1
- package/lib/protect/rules/base-scanner/postgresqlscanner.js +1 -1
- package/lib/protect/rules/base-scanner/scan-state.js +1 -1
- package/lib/protect/rules/base-scanner/substring-finder.js +1 -1
- package/lib/protect/rules/base-scanner/token-sequence.js +1 -1
- package/lib/protect/rules/bot-blocker/bot-blocker-rule.js +1 -1
- package/lib/protect/rules/bot-blocker/index.js +1 -1
- package/lib/protect/rules/cmd-injection/cmdinjection-rule.js +1 -1
- package/lib/protect/rules/cmd-injection-command-backdoors/backdoor-detector.js +1 -1
- package/lib/protect/rules/cmd-injection-command-backdoors/cmd-injection-command-backdoors-rule.js +1 -1
- package/lib/protect/rules/cmd-injection-semantic-chained-commands/chained-command-scanner.js +1 -1
- package/lib/protect/rules/cmd-injection-semantic-chained-commands/cmd-injection-semantic-chained-commands-rule.js +1 -1
- package/lib/protect/rules/cmd-injection-semantic-dangerous-paths/cmd-injection-semantic-dangerous-paths-rule.js +1 -1
- package/lib/protect/rules/cmd-injection-semantic-dangerous-paths/dangerous-paths-scanner.js +1 -1
- package/lib/protect/rules/common.js +1 -1
- package/lib/protect/rules/index.js +1 -1
- package/lib/protect/rules/ip-denylist/ip-denylist-rule.js +1 -1
- package/lib/protect/rules/method-tampering/evaluator.js +1 -1
- package/lib/protect/rules/method-tampering/method-tampering-rule.js +1 -1
- package/lib/protect/rules/nosqli/nosql-injection-rule.js +228 -0
- package/lib/protect/rules/nosqli/nosql-scanner/index.js +1 -1
- package/lib/protect/rules/nosqli/nosql-scanner/mongodbscanner.js +1 -1
- package/lib/protect/rules/path-traversal/path-traversal-rule.js +1 -1
- package/lib/protect/rules/rule-factory.js +3 -3
- package/lib/protect/rules/signatures/cmd-injection/custom-searchers/chained-command-searcher.js +1 -1
- package/lib/protect/rules/signatures/cmd-injection/custom-searchers/index.js +1 -1
- package/lib/protect/rules/signatures/cmd-injection/index.js +1 -1
- package/lib/protect/rules/signatures/evaluator.js +1 -1
- package/lib/protect/rules/signatures/index.js +1 -1
- package/lib/protect/rules/signatures/nosql-injection/custom-searchers/index.js +1 -1
- package/lib/protect/rules/signatures/nosql-injection/custom-searchers/nosql-comment-searcher.js +1 -1
- package/lib/protect/rules/signatures/nosql-injection/custom-searchers/simple-or-searcher.js +1 -1
- package/lib/protect/rules/signatures/nosql-injection/index.js +1 -1
- package/lib/protect/rules/signatures/path-traversal/index.js +1 -1
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/behavior-url-searcher.js +1 -1
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/function-definition-searcher.js +1 -1
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/immediate-function-searcher.js +1 -1
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/index.js +1 -1
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/link-and-src-target-searcher.js +1 -1
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/location-set-searcher.js +1 -1
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/map-access-searcher.js +1 -1
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/native-function-execution-searcher.js +1 -1
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/no-alnum-searcher.js +1 -1
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/redefined-function-searcher.js +1 -1
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/style-url-injection-searcher.js +1 -1
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/variable-assignment-searcher.js +1 -1
- package/lib/protect/rules/signatures/reflected-xss/helpers/function-call.js +1 -1
- package/lib/protect/rules/signatures/reflected-xss/index.js +1 -1
- package/lib/protect/rules/signatures/signature.js +1 -1
- package/lib/protect/rules/signatures/sql-injection/custom-searchers/if-else-drop-searcher.js +1 -1
- package/lib/protect/rules/signatures/sql-injection/custom-searchers/index.js +1 -1
- package/lib/protect/rules/signatures/sql-injection/custom-searchers/simple-or-searcher.js +1 -1
- package/lib/protect/rules/signatures/sql-injection/custom-searchers/sql-comment-searcher.js +1 -1
- package/lib/protect/rules/signatures/sql-injection/custom-searchers/time-function-searcher.js +1 -1
- package/lib/protect/rules/signatures/sql-injection/custom-searchers/tsql-exec-searcher.js +1 -1
- package/lib/protect/rules/signatures/sql-injection/index.js +1 -1
- package/lib/protect/rules/signatures/ssjs-injection/index.js +1 -1
- package/lib/protect/rules/signatures/unsafe-file-upload/index.js +1 -1
- package/lib/protect/rules/signatures/untrusted-deserialization/index.js +1 -1
- package/lib/protect/rules/sqli/generic-complicated.js +1 -1
- package/lib/protect/rules/sqli/sql-injection-rule.js +1 -1
- package/lib/protect/rules/sqli/sql-scanner/index.js +1 -1
- package/lib/protect/rules/sqli/sql-scanner/mysql-scanner.js +1 -1
- package/lib/protect/rules/ssjs-injection/evaluator.js +1 -1
- package/lib/protect/rules/ssjs-injection/ssjsinjection-rule.js +1 -1
- package/lib/protect/rules/unsafe-file-upload/unsafe-file-upload-rule.js +1 -1
- package/lib/protect/rules/untrusted-deserialization/untrusted-deserialization-rule.js +1 -1
- package/lib/protect/rules/virtual-patch/index.js +1 -1
- package/lib/protect/rules/virtual-patch/utils.js +1 -1
- package/lib/protect/rules/virtual-patch/virtual-patch-rule.js +1 -1
- package/lib/protect/rules/xss/helpers/function-call.js +1 -1
- package/lib/protect/rules/xss/reflected-xss-rule.js +1 -1
- package/lib/protect/rules/xxe/xxerule.js +1 -1
- package/lib/protect/sample-aggregator.js +1 -1
- package/lib/protect/samples.js +1 -1
- package/lib/protect/service.js +24 -12
- package/lib/protect/sinks/child-process.js +1 -1
- package/lib/protect/sinks/eval.js +1 -1
- package/lib/protect/sinks/fs.js +1 -1
- package/lib/protect/sinks/function.js +1 -1
- package/lib/protect/sinks/index.js +1 -1
- package/lib/protect/sinks/libxmljs.js +1 -1
- package/lib/protect/sinks/mongodb.js +57 -56
- package/lib/protect/sinks/mysql.js +1 -1
- package/lib/protect/sinks/node-serialize.js +1 -1
- package/lib/protect/sinks/postgres.js +1 -1
- package/lib/protect/sinks/sequelize.js +1 -1
- package/lib/protect/sinks/sqlite3.js +1 -1
- package/lib/protect/sinks/vm.js +1 -1
- package/lib/protect/sources/busboy.js +1 -1
- package/lib/protect/sources/formidable.js +1 -1
- package/lib/protect/sources/index.js +1 -1
- package/lib/protect/validators/authorization.js +1 -1
- package/lib/protect/validators/common.js +1 -1
- package/lib/protect/validators/connection.js +1 -1
- package/lib/protect/validators/content-length.js +1 -1
- package/lib/protect/validators/host.js +1 -1
- package/lib/protect/validators/if-none-match.js +1 -1
- package/lib/protect/validators/index.js +1 -1
- package/lib/protect/validators/origin.js +1 -1
- package/lib/reporter/app-activity-queue.js +1 -1
- package/lib/reporter/grpc-client.js +1 -1
- package/lib/reporter/messages/speedracer/activity.js +1 -1
- package/lib/reporter/messages/speedracer/application-create.js +1 -1
- package/lib/reporter/messages/speedracer/application-update.js +1 -1
- package/lib/reporter/messages/speedracer/base.js +1 -1
- package/lib/reporter/messages/speedracer/index.js +1 -1
- package/lib/reporter/messages/speedracer/observed-route.js +1 -1
- package/lib/reporter/messages/speedracer/poll.js +1 -1
- package/lib/reporter/messages/speedracer/request.js +1 -1
- package/lib/reporter/messages/speedracer/startup.js +1 -1
- package/lib/reporter/messaging-router.js +1 -1
- package/lib/reporter/models/app-activity/app-activity.js +1 -1
- package/lib/reporter/models/app-activity/attacker-activity.js +1 -1
- package/lib/reporter/models/app-activity/defend.js +1 -1
- package/lib/reporter/models/app-activity/inventory.js +1 -1
- package/lib/reporter/models/app-activity/protection-rule-activity.js +1 -1
- package/lib/reporter/models/app-activity/rule-events.js +1 -1
- package/lib/reporter/models/app-activity/sample.js +1 -1
- package/lib/reporter/models/app-activity/source.js +1 -1
- package/lib/reporter/models/app-activity/user-input.js +1 -1
- package/lib/reporter/models/app-create.js +1 -1
- package/lib/reporter/models/app-update/index.js +1 -1
- package/lib/reporter/models/app-update/library-manifest.js +1 -1
- package/lib/reporter/models/app-update/library-usage.js +1 -1
- package/lib/reporter/models/app-update/library.js +1 -1
- package/lib/reporter/models/event-tag.js +1 -1
- package/lib/reporter/models/finding/event.js +1 -1
- package/lib/reporter/models/finding/finding.js +1 -1
- package/lib/reporter/models/frameworks/express-request.js +1 -1
- package/lib/reporter/models/frameworks/fastify-request.js +1 -1
- package/lib/reporter/models/frameworks/hapi-request.js +1 -1
- package/lib/reporter/models/frameworks/index.js +1 -1
- package/lib/reporter/models/frameworks/koa-request.js +1 -1
- package/lib/reporter/models/frameworks/restify-request.js +1 -1
- package/lib/reporter/models/observed-route.js +1 -1
- package/lib/reporter/models/request.js +1 -1
- package/lib/reporter/models/route-coverage.js +1 -1
- package/lib/reporter/models/startup.js +1 -1
- package/lib/reporter/models/trace-event-source.js +1 -1
- package/lib/reporter/models/utils/request-factory.js +1 -1
- package/lib/reporter/models/utils/user-input-factory.js +1 -1
- package/lib/reporter/models/utils/user-input-kit.js +1 -1
- package/lib/reporter/mq-client.js +1 -1
- package/lib/reporter/server-activity-queue.js +1 -1
- package/lib/reporter/socket-client.js +1 -1
- package/lib/reporter/speedracer/base-connection-state.js +1 -1
- package/lib/reporter/speedracer/constants.js +1 -1
- package/lib/reporter/speedracer/failure-connection-state.js +1 -1
- package/lib/reporter/speedracer/index.js +1 -1
- package/lib/reporter/speedracer/success-connection-state.js +1 -1
- package/lib/reporter/speedracer/unknown-connection-state.js +1 -1
- package/lib/reporter/translations/enums.js +1 -1
- package/lib/reporter/translations/helpers.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/activity.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/address.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/agent-startup.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/application-create.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/application-update.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/architecture-component.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/attack-result.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/bot-blocker-details.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/cmd-injection-details.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/cmd-injection-semantic-analysis-details.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/finding.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/http-method-tampering-details.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/http-request.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/index.js +2 -2
- package/lib/reporter/translations/to-protobuf/dtm/ip-denylist-details.js +2 -2
- package/lib/reporter/translations/to-protobuf/dtm/library-usage-update.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/no-sql-injection-details.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/observed-route.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/pair.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/path-traversal-details.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/poll.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/rasp-rule-sample.js +2 -2
- package/lib/reporter/translations/to-protobuf/dtm/raw-request.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/route-coverage.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/simple-pair.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/sql-injection-details.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/ssjs-injection-details.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/stack-trace-element.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/action.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/index.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/parent-object-id.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/trace-event-object.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/trace-event-signature.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/trace-event-source.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/trace-stack.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/trace-taint-range.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/type.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/untrusted-deserialization-details.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/user-input.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/virtual-patch-details.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/xss-details.js +1 -1
- package/lib/reporter/translations/to-protobuf/dtm/xxe-details.js +1 -1
- package/lib/reporter/translations/to-protobuf/index.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/application-settings.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/assess-features.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/auth.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/bot-blocker.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/custom-rule-feature.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/defend-features.js +9 -7
- package/lib/reporter/translations/to-protobuf/settings/exclusions.js +6 -5
- package/lib/reporter/translations/to-protobuf/settings/index.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/input-analysis-result.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/inventory-features.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/ip-filter.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/log-enhancer.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/protection-rule.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/reaction.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/rule-definition.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/sampling.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/server-features.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/syslog.js +1 -1
- package/lib/reporter/translations/to-protobuf/settings/virtual-patch.js +1 -1
- package/lib/reporter/ts-reporter.js +1 -1
- package/lib/tracker.js +14 -66
- package/lib/util/base64.js +1 -1
- package/lib/util/bitset.js +1 -1
- package/lib/util/block-request.js +1 -1
- package/lib/util/callback-resolver.js +1 -1
- package/lib/util/clean-stack.js +1 -1
- package/lib/util/clean-string/brackets.js +1 -1
- package/lib/util/clean-string/clean-string-base.js +1 -1
- package/lib/util/clean-string/comments.js +1 -1
- package/lib/util/clean-string/concatenations.js +1 -1
- package/lib/util/clean-string/jsclean-string.js +1 -1
- package/lib/util/clean-string/placeholders.js +1 -1
- package/lib/util/clean-string/util.js +1 -1
- package/lib/util/colors.js +1 -1
- package/lib/util/file-finder.js +1 -1
- package/lib/util/heap-dump.js +1 -1
- package/lib/util/html-util.js +1 -1
- package/lib/util/ip-analyzer.js +1 -1
- package/lib/util/is-agent-path.js +1 -1
- package/lib/util/is-contrast-error.js +1 -1
- package/lib/util/is-piped-to-dev.js +1 -1
- package/lib/util/is-string.js +1 -1
- package/lib/util/partial.js +1 -1
- package/lib/util/pkg-name.js +1 -1
- package/lib/util/request-util.js +1 -1
- package/lib/util/resolve-obj.js +1 -1
- package/lib/util/route-info.js +1 -1
- package/lib/util/some.js +1 -1
- package/lib/util/source-map.js +2 -2
- package/lib/util/static-rules.js +1 -1
- package/lib/util/trace-util.js +1 -1
- package/lib/util/traverse.js +1 -1
- package/lib/util/user-input-evaluator.js +1 -1
- package/lib/util/xml-analyzer/external-entity-finder.js +1 -1
- package/package.json +14 -16
- package/perf-logs.js +1 -1
- package/lib/hooks/frameworks/https.js +0 -42
- package/lib/protect/rules/nosqli/no-sql-injection-rule.js +0 -109
- package/node_modules/bindings/LICENSE.md +0 -22
- package/node_modules/bindings/README.md +0 -98
- package/node_modules/bindings/bindings.js +0 -221
- package/node_modules/bindings/package.json +0 -32
- package/node_modules/file-uri-to-path/.npmignore +0 -1
- package/node_modules/file-uri-to-path/.travis.yml +0 -30
- package/node_modules/file-uri-to-path/History.md +0 -21
- package/node_modules/file-uri-to-path/LICENSE +0 -20
- package/node_modules/file-uri-to-path/README.md +0 -74
- package/node_modules/file-uri-to-path/index.d.ts +0 -2
- package/node_modules/file-uri-to-path/index.js +0 -66
- package/node_modules/file-uri-to-path/package.json +0 -36
- package/node_modules/file-uri-to-path/test/test.js +0 -24
- package/node_modules/file-uri-to-path/test/tests.json +0 -13
- package/node_modules/glossy/LICENSE +0 -19
- package/node_modules/glossy/README.md +0 -129
- package/node_modules/glossy/index.js +0 -12
- package/node_modules/glossy/lib/glossy/parse.js +0 -520
- package/node_modules/glossy/lib/glossy/produce.js +0 -459
- package/node_modules/glossy/package.json +0 -47
- package/node_modules/glossy/test/decide.js +0 -7
- package/node_modules/glossy/test/decode_pri.js +0 -24
- package/node_modules/glossy/test/parse_3164.js +0 -104
- package/node_modules/glossy/test/parse_5424.js +0 -106
- package/node_modules/glossy/test/parse_5848.js +0 -40
- package/node_modules/glossy/test/parse_8601.js +0 -14
- package/node_modules/glossy/test/parse_rfc3339.js +0 -9
- package/node_modules/glossy/test/produce.js +0 -162
- package/node_modules/glossy/test/runner.js +0 -40
- package/node_modules/glossy/test/structure_data.js +0 -24
- package/node_modules/nan/CHANGELOG.md +0 -537
- package/node_modules/nan/LICENSE.md +0 -13
- package/node_modules/nan/README.md +0 -455
- package/node_modules/nan/doc/asyncworker.md +0 -146
- package/node_modules/nan/doc/buffers.md +0 -54
- package/node_modules/nan/doc/callback.md +0 -76
- package/node_modules/nan/doc/converters.md +0 -41
- package/node_modules/nan/doc/errors.md +0 -226
- package/node_modules/nan/doc/json.md +0 -62
- package/node_modules/nan/doc/maybe_types.md +0 -583
- package/node_modules/nan/doc/methods.md +0 -664
- package/node_modules/nan/doc/new.md +0 -147
- package/node_modules/nan/doc/node_misc.md +0 -123
- package/node_modules/nan/doc/object_wrappers.md +0 -263
- package/node_modules/nan/doc/persistent.md +0 -296
- package/node_modules/nan/doc/scopes.md +0 -73
- package/node_modules/nan/doc/script.md +0 -38
- package/node_modules/nan/doc/string_bytes.md +0 -62
- package/node_modules/nan/doc/v8_internals.md +0 -199
- package/node_modules/nan/doc/v8_misc.md +0 -85
- package/node_modules/nan/include_dirs.js +0 -1
- package/node_modules/nan/nan.h +0 -2898
- package/node_modules/nan/nan_callbacks.h +0 -88
- package/node_modules/nan/nan_callbacks_12_inl.h +0 -514
- package/node_modules/nan/nan_callbacks_pre_12_inl.h +0 -520
- package/node_modules/nan/nan_converters.h +0 -72
- package/node_modules/nan/nan_converters_43_inl.h +0 -68
- package/node_modules/nan/nan_converters_pre_43_inl.h +0 -42
- package/node_modules/nan/nan_define_own_property_helper.h +0 -29
- package/node_modules/nan/nan_implementation_12_inl.h +0 -430
- package/node_modules/nan/nan_implementation_pre_12_inl.h +0 -263
- package/node_modules/nan/nan_json.h +0 -166
- package/node_modules/nan/nan_maybe_43_inl.h +0 -356
- package/node_modules/nan/nan_maybe_pre_43_inl.h +0 -268
- package/node_modules/nan/nan_new.h +0 -340
- package/node_modules/nan/nan_object_wrap.h +0 -156
- package/node_modules/nan/nan_persistent_12_inl.h +0 -132
- package/node_modules/nan/nan_persistent_pre_12_inl.h +0 -242
- package/node_modules/nan/nan_private.h +0 -73
- package/node_modules/nan/nan_string_bytes.h +0 -305
- package/node_modules/nan/nan_typedarray_contents.h +0 -96
- package/node_modules/nan/nan_weak.h +0 -437
- package/node_modules/nan/package.json +0 -41
- package/node_modules/nan/tools/1to2.js +0 -412
- package/node_modules/nan/tools/README.md +0 -14
- package/node_modules/nan/tools/package.json +0 -19
- package/node_modules/unix-dgram/LICENSE +0 -13
- package/node_modules/unix-dgram/README.md +0 -107
- package/node_modules/unix-dgram/binding.gyp +0 -20
- package/node_modules/unix-dgram/build/Makefile +0 -324
- package/node_modules/unix-dgram/build/Release/.deps/Release/obj.target/unix_dgram/src/unix_dgram.o.d +0 -58
- package/node_modules/unix-dgram/build/Release/.deps/Release/obj.target/unix_dgram.node.d +0 -1
- package/node_modules/unix-dgram/build/Release/.deps/Release/unix_dgram.node.d +0 -1
- package/node_modules/unix-dgram/build/Release/obj.target/unix_dgram/src/unix_dgram.o +0 -0
- package/node_modules/unix-dgram/build/Release/obj.target/unix_dgram.node +0 -0
- package/node_modules/unix-dgram/build/Release/unix_dgram.node +0 -0
- package/node_modules/unix-dgram/build/binding.Makefile +0 -6
- package/node_modules/unix-dgram/build/config.gypi +0 -213
- package/node_modules/unix-dgram/build/unix_dgram.target.mk +0 -159
- package/node_modules/unix-dgram/lib/unix_dgram.js +0 -168
- package/node_modules/unix-dgram/package.json +0 -36
- package/node_modules/unix-dgram/src/unix_dgram.cc +0 -404
- package/node_modules/unix-dgram/src/win_dummy.cc +0 -7
- package/node_modules/unix-dgram/test/test-connect-callback.js +0 -68
- package/node_modules/unix-dgram/test/test-connect.js +0 -53
- package/node_modules/unix-dgram/test/test-dgram-unix.js +0 -58
- package/node_modules/unix-dgram/test/test-send-error.js +0 -26
- package/node_modules/winston-syslog/.eslintrc +0 -7
- package/node_modules/winston-syslog/.travis.yml +0 -14
- package/node_modules/winston-syslog/CHANGELOG.md +0 -9
- package/node_modules/winston-syslog/LICENSE +0 -20
- package/node_modules/winston-syslog/README.md +0 -135
- package/node_modules/winston-syslog/lib/utils.js +0 -26
- package/node_modules/winston-syslog/lib/winston-syslog.js +0 -385
- package/node_modules/winston-syslog/package.json +0 -56
- package/node_modules/winston-syslog/test/format-test.js +0 -122
- package/node_modules/winston-syslog/test/syslog-test.js +0 -95
- package/node_modules/winston-syslog/test/unix-connect-test.js +0 -133
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
Copyright:
|
|
2
|
+
Copyright: 2022 Contrast Security, Inc
|
|
3
3
|
Contact: support@contrastsecurity.com
|
|
4
4
|
License: Commercial
|
|
5
5
|
|
|
@@ -164,28 +164,27 @@ module.exports.handle = {
|
|
|
164
164
|
if (tagStart !== null) {
|
|
165
165
|
newTagRanges.push(new TagRange(tagStart, tagStop, tag.tag));
|
|
166
166
|
const tracked = tracker.track(stringPart);
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
if (tracked) {
|
|
168
|
+
tracked.props.tagRanges.push(new TagRange(tagStart, tagStop, tag.tag));
|
|
169
|
+
result[i] = tracked.str;
|
|
170
170
|
}
|
|
171
|
-
props.tagRanges.push(new TagRange(tagStart, tagStop, tag.tag));
|
|
172
|
-
result[i] = tracked;
|
|
173
171
|
}
|
|
174
172
|
});
|
|
175
173
|
if (newTagRanges.length > 0) {
|
|
176
174
|
const tracked = tracker.track(stringPart);
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
175
|
+
if (tracked) {
|
|
176
|
+
tracked.props.tagRanges = newTagRanges;
|
|
177
|
+
result[i] = tracked.str;
|
|
178
|
+
const event = new PropagationEvent({
|
|
179
|
+
context: ctxt,
|
|
180
|
+
signature: sig,
|
|
181
|
+
tagRanges: tracked.props.tagRanges,
|
|
182
|
+
source: 'O',
|
|
183
|
+
target: 'R'
|
|
184
|
+
});
|
|
185
|
+
event.parents.push(oldEvent);
|
|
186
|
+
tracked.props.event = event;
|
|
187
|
+
}
|
|
189
188
|
}
|
|
190
189
|
}
|
|
191
190
|
data.result = result;
|
|
@@ -225,21 +224,21 @@ function handleEmptySeperator(data, oldTagRanges, oldEvent) {
|
|
|
225
224
|
if (sharedCharInfo.has(i)) {
|
|
226
225
|
info = sharedCharInfo.get(i);
|
|
227
226
|
} else {
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
227
|
+
const tracked = tracker.track(char);
|
|
228
|
+
if (tracked) {
|
|
229
|
+
const event = new PropagationEvent({
|
|
230
|
+
context: ctxt,
|
|
231
|
+
signature: sig,
|
|
232
|
+
tagRanges: getTagRanges(tracked.str),
|
|
233
|
+
source: 'O',
|
|
234
|
+
target: 'R'
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
tracked.props.event = event;
|
|
238
|
+
info = { event, tagRanges: tracked.props.tagRanges };
|
|
239
|
+
sharedCharInfo.set(i, info);
|
|
240
|
+
result[i] = tracked.str;
|
|
241
|
+
}
|
|
243
242
|
}
|
|
244
243
|
|
|
245
244
|
info.tagRanges.push(new TagRange(0, 0, tag.tag));
|
|
@@ -257,10 +256,11 @@ function transferTracking(origString, resultArray) {
|
|
|
257
256
|
|
|
258
257
|
for (let i = 0; i < resultArray.length; i++) {
|
|
259
258
|
const tracked = tracker.track(resultArray[i]);
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
259
|
+
if (tracked) {
|
|
260
|
+
tracked.props.tagRanges = getTagRanges(origString);
|
|
261
|
+
tracked.props.event = getEvent(origString);
|
|
262
|
+
resultArray[i] = tracked.str;
|
|
263
|
+
}
|
|
264
264
|
}
|
|
265
265
|
return resultArray;
|
|
266
266
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
Copyright:
|
|
2
|
+
Copyright: 2022 Contrast Security, Inc
|
|
3
3
|
Contact: support@contrastsecurity.com
|
|
4
4
|
License: Commercial
|
|
5
5
|
|
|
@@ -25,7 +25,7 @@ const signature = new Signature('String.prototype.trim');
|
|
|
25
25
|
function handle(data) {
|
|
26
26
|
const { obj, result } = data;
|
|
27
27
|
const sourceMetadata = tracker.getData(obj);
|
|
28
|
-
if (!sourceMetadata
|
|
28
|
+
if (!sourceMetadata) {
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -43,21 +43,19 @@ function handle(data) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
const tracked = tracker.track(result);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
if (tracked) {
|
|
47
|
+
tracked.props.tagRanges = targetRanges;
|
|
48
|
+
const context = new CallContext(data);
|
|
49
|
+
const event = new PropagationEvent({
|
|
50
|
+
context,
|
|
51
|
+
signature,
|
|
52
|
+
tagRanges: targetRanges,
|
|
53
|
+
source: 'O',
|
|
54
|
+
target: 'R'
|
|
55
|
+
});
|
|
56
|
+
event.parents.push(sourceEvent);
|
|
57
|
+
tracked.props.event = event;
|
|
58
|
+
|
|
59
|
+
data.result = tracked.str;
|
|
49
60
|
}
|
|
50
|
-
trackedData.tagRanges = targetRanges;
|
|
51
|
-
const context = new CallContext(data);
|
|
52
|
-
const event = new PropagationEvent({
|
|
53
|
-
context,
|
|
54
|
-
signature,
|
|
55
|
-
tagRanges: targetRanges,
|
|
56
|
-
source: 'O',
|
|
57
|
-
target: 'R'
|
|
58
|
-
});
|
|
59
|
-
event.parents.push(sourceEvent);
|
|
60
|
-
trackedData.event = event;
|
|
61
|
-
|
|
62
|
-
data.result = tracked;
|
|
63
61
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
Copyright:
|
|
2
|
+
Copyright: 2022 Contrast Security, Inc
|
|
3
3
|
Contact: support@contrastsecurity.com
|
|
4
4
|
License: Commercial
|
|
5
5
|
|
|
@@ -41,30 +41,26 @@ function handle() {
|
|
|
41
41
|
|
|
42
42
|
// Checks if the string literal form of the new String object is tracked.
|
|
43
43
|
// If so, we will want to copy the existing tag ranges below.
|
|
44
|
-
if (data.obj && !argData
|
|
44
|
+
if (data.obj && !argData) {
|
|
45
45
|
argData = tracker.getData(data.result.toString());
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
if (!arg || !argData
|
|
48
|
+
if (!arg || !argData) {
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
const
|
|
53
|
-
|
|
52
|
+
const tracked = tracker.track(data.result);
|
|
53
|
+
if (tracked) {
|
|
54
|
+
// In a constructor context, data.obj is set to the new String object.
|
|
55
|
+
// When a new String object is instantiated we must copy the existing tag
|
|
56
|
+
// ranges from the string literal to the new String object.
|
|
57
|
+
if (data.obj) {
|
|
58
|
+
tracked.props.event = argData.event;
|
|
59
|
+
tracked.props.tagRanges = tracked.props.tagRanges.concat(argData.tagRanges);
|
|
60
|
+
}
|
|
54
61
|
|
|
55
|
-
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// In a constructor context, data.obj is set to the new String object.
|
|
60
|
-
// When a new String object is instantiated we must copy the existing tag
|
|
61
|
-
// ranges from the string literal to the new String object.
|
|
62
|
-
if (data.obj) {
|
|
63
|
-
newStrData.event = argData.event;
|
|
64
|
-
newStrData.tagRanges = newStrData.tagRanges.concat(argData.tagRanges);
|
|
62
|
+
data.result = tracked.str;
|
|
65
63
|
}
|
|
66
|
-
|
|
67
|
-
data.result = newStr;
|
|
68
64
|
}
|
|
69
65
|
});
|
|
70
66
|
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Copyright: 2022 Contrast Security, Inc
|
|
3
|
+
Contact: support@contrastsecurity.com
|
|
4
|
+
License: Commercial
|
|
5
|
+
|
|
6
|
+
NOTICE: This Software and the patented inventions embodied within may only be
|
|
7
|
+
used as part of Contrast Security’s commercial offerings. Even though it is
|
|
8
|
+
made available through public repositories, use of this Software is subject to
|
|
9
|
+
the applicable End User Licensing Agreement found at
|
|
10
|
+
https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed
|
|
11
|
+
between Contrast Security and the End User. The Software may not be reverse
|
|
12
|
+
engineered, modified, repackaged, sold, redistributed or otherwise used in a
|
|
13
|
+
way not consistent with the End User License Agreement.
|
|
14
|
+
*/
|
|
15
|
+
'use strict';
|
|
16
|
+
|
|
17
|
+
const tracker = require('../../tracker');
|
|
18
|
+
const TagRange = require('../models/tag-range');
|
|
19
|
+
const { CallContext, PropagationEvent, Signature } = require('../models');
|
|
20
|
+
|
|
21
|
+
function getEscapedTagRanges(input, result, start, stop, tag) {
|
|
22
|
+
const textArr = input.split('').slice(start, stop + 1);
|
|
23
|
+
const escapedArr = result.split('');
|
|
24
|
+
const overlap = textArr.filter((x) => {
|
|
25
|
+
if (escapedArr.includes(x)) {
|
|
26
|
+
return x;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
if (overlap.length === 0) {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
const newTagRanges = [];
|
|
33
|
+
let firstIndex = escapedArr.indexOf(overlap[0]);
|
|
34
|
+
let currIndex = firstIndex;
|
|
35
|
+
let nextIndex;
|
|
36
|
+
for (let i = 1; i < overlap.length; i++) {
|
|
37
|
+
nextIndex = escapedArr.indexOf(overlap[i], currIndex + 1);
|
|
38
|
+
if (nextIndex !== currIndex + 1) {
|
|
39
|
+
newTagRanges.push(new TagRange(firstIndex, currIndex, tag));
|
|
40
|
+
firstIndex = nextIndex;
|
|
41
|
+
}
|
|
42
|
+
if (i === overlap.length - 1) {
|
|
43
|
+
newTagRanges.push(new TagRange(firstIndex, nextIndex, tag));
|
|
44
|
+
}
|
|
45
|
+
currIndex = nextIndex;
|
|
46
|
+
}
|
|
47
|
+
return newTagRanges;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function propagator(data, tagName, signatureName) {
|
|
51
|
+
const input = data.args[0];
|
|
52
|
+
|
|
53
|
+
const trackedData = tracker.getData(input);
|
|
54
|
+
|
|
55
|
+
if (!input || !trackedData) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// adjust tag ranges
|
|
60
|
+
const tagRanges = [];
|
|
61
|
+
trackedData.tagRanges.forEach((range) => {
|
|
62
|
+
const { start, stop, tag } = range;
|
|
63
|
+
tagRanges.push(
|
|
64
|
+
...getEscapedTagRanges(input, data.result, start, stop, tag)
|
|
65
|
+
);
|
|
66
|
+
});
|
|
67
|
+
tagRanges.push(new TagRange(0, data.result.length - 1, tagName));
|
|
68
|
+
const tracked = tracker.track(data.result);
|
|
69
|
+
if (tracked) {
|
|
70
|
+
tracked.props.tagRanges = tagRanges;
|
|
71
|
+
tracked.props.event = new PropagationEvent({
|
|
72
|
+
context: new CallContext({
|
|
73
|
+
...data,
|
|
74
|
+
obj: null
|
|
75
|
+
}),
|
|
76
|
+
parents: [tracked.props.event],
|
|
77
|
+
signature: new Signature(signatureName),
|
|
78
|
+
source: 'P',
|
|
79
|
+
target: 'R',
|
|
80
|
+
tagRanges,
|
|
81
|
+
tags: tagName
|
|
82
|
+
});
|
|
83
|
+
data.result = tracked.str;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
module.exports.propagate = propagator;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
Copyright:
|
|
2
|
+
Copyright: 2022 Contrast Security, Inc
|
|
3
3
|
Contact: support@contrastsecurity.com
|
|
4
4
|
License: Commercial
|
|
5
5
|
|
|
@@ -21,10 +21,9 @@ const tracker = require('../../tracker.js');
|
|
|
21
21
|
|
|
22
22
|
const { PropagationEvent, Signature, CallContext } = require('../models');
|
|
23
23
|
const { isString } = require('../../util/is-string');
|
|
24
|
+
const injections = require('../../core/rewrite/injections');
|
|
24
25
|
|
|
25
|
-
const ContrastMethods =
|
|
26
|
-
'ContrastMethods'
|
|
27
|
-
);
|
|
26
|
+
const ContrastMethods = injections.get('ContrastMethods');
|
|
28
27
|
|
|
29
28
|
/**
|
|
30
29
|
* In order to propagate through template literals, we leverage rewriting to
|
|
@@ -76,17 +75,17 @@ function __contrastTag(...args) {
|
|
|
76
75
|
});
|
|
77
76
|
|
|
78
77
|
if (tagRanges.length > 0) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (resultContrastProperties.tracked) {
|
|
78
|
+
const tracked = tracker.track(result);
|
|
79
|
+
if (tracked) {
|
|
82
80
|
buildProperties(
|
|
83
|
-
|
|
81
|
+
tracked.props,
|
|
84
82
|
tagRanges,
|
|
85
83
|
expressions,
|
|
86
|
-
|
|
84
|
+
tracked.str,
|
|
87
85
|
strings,
|
|
88
86
|
sourceEvents
|
|
89
87
|
);
|
|
88
|
+
result = tracked.str;
|
|
90
89
|
}
|
|
91
90
|
}
|
|
92
91
|
|
|
@@ -144,18 +143,18 @@ function buildProperties(props, tagRanges, exps, result, strings, events) {
|
|
|
144
143
|
*/
|
|
145
144
|
function moveTags(exp, sourceEvents, tagRanges, offset) {
|
|
146
145
|
const contrastProperties = tracker.getData(exp);
|
|
147
|
-
const tracked = contrastProperties
|
|
146
|
+
const tracked = contrastProperties || tagRanges.length > 0;
|
|
148
147
|
if (!tracked) {
|
|
149
148
|
return tagRanges;
|
|
150
149
|
}
|
|
151
150
|
|
|
152
|
-
const event = contrastProperties
|
|
151
|
+
const event = contrastProperties && contrastProperties.event;
|
|
153
152
|
if (event) {
|
|
154
153
|
sourceEvents.push(event);
|
|
155
154
|
}
|
|
156
155
|
|
|
157
156
|
let newTagRanges = [];
|
|
158
|
-
if (contrastProperties
|
|
157
|
+
if (contrastProperties) newTagRanges = contrastProperties.tagRanges;
|
|
159
158
|
|
|
160
159
|
return tagRangeUtil.addAllWithOffset(tagRanges, newTagRanges, offset);
|
|
161
160
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
Copyright:
|
|
2
|
+
Copyright: 2022 Contrast Security, Inc
|
|
3
3
|
Contact: support@contrastsecurity.com
|
|
4
4
|
License: Commercial
|
|
5
5
|
|
|
@@ -45,7 +45,7 @@ function handle(data) {
|
|
|
45
45
|
const address = data.args[0];
|
|
46
46
|
const sourceMetadata = tracker.getData(address);
|
|
47
47
|
|
|
48
|
-
if (!sourceMetadata
|
|
48
|
+
if (!sourceMetadata) {
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -71,9 +71,8 @@ function propagate(sourceMetadata, address, data) {
|
|
|
71
71
|
|
|
72
72
|
if (part && typeof part === 'string' && part !== '') {
|
|
73
73
|
const tracked = tracker.track(part);
|
|
74
|
-
const trackedData = tracker.getData(tracked);
|
|
75
74
|
|
|
76
|
-
if (!
|
|
75
|
+
if (!tracked) {
|
|
77
76
|
continue;
|
|
78
77
|
}
|
|
79
78
|
|
|
@@ -105,10 +104,10 @@ function propagate(sourceMetadata, address, data) {
|
|
|
105
104
|
);
|
|
106
105
|
event.parents.push(sourceEvent);
|
|
107
106
|
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
tracked.props.tagRanges = targetTagRanges;
|
|
108
|
+
tracked.props.event = event;
|
|
110
109
|
|
|
111
|
-
url[key] = tracked;
|
|
110
|
+
url[key] = tracked.str;
|
|
112
111
|
}
|
|
113
112
|
}
|
|
114
113
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
Copyright:
|
|
2
|
+
Copyright: 2022 Contrast Security, Inc
|
|
3
3
|
Contact: support@contrastsecurity.com
|
|
4
4
|
License: Commercial
|
|
5
5
|
|
|
@@ -71,6 +71,9 @@ function setHostnamePortTags(urlObj, stack, args, sourceEvent) {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
const hostData = tracker.getData(urlObj._contrast_host);
|
|
74
|
+
if (!hostData) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
74
77
|
const hostnameTags = tagRangeUtil.trim(hostData.tagRanges, 0, splitIndex - 1);
|
|
75
78
|
const portTags = tagRangeUtil.trim(
|
|
76
79
|
hostData.tagRanges,
|
|
@@ -81,21 +84,25 @@ function setHostnamePortTags(urlObj, stack, args, sourceEvent) {
|
|
|
81
84
|
|
|
82
85
|
if (hostnameTags.length > 0) {
|
|
83
86
|
const hostnameTracked = tracker.track(hostname);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
if (hostnameTracked) {
|
|
88
|
+
hostnameTracked.props.tagRanges = hostnameTags;
|
|
89
|
+
urlObj._contrast_hostname = hostnameTracked.str;
|
|
90
|
+
event = createEvent('url.URL', stack, hostnameTags, hostname, args, urlObj);
|
|
91
|
+
event.parents.push(sourceEvent);
|
|
92
|
+
event.tagRanges = hostnameTags;
|
|
93
|
+
hostnameTracked.props.event = event;
|
|
94
|
+
}
|
|
90
95
|
}
|
|
91
96
|
if (portTags.length > 0) {
|
|
92
97
|
const portTracked = tracker.track(port);
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
if (portTracked) {
|
|
99
|
+
portTracked.props.tagRanges = portTags;
|
|
100
|
+
urlObj._contrast_port = portTracked.str;
|
|
101
|
+
event = createEvent('url.URL', stack, portTags, port, args, urlObj);
|
|
102
|
+
event.parents.push(sourceEvent);
|
|
103
|
+
event.tagRanges = portTags;
|
|
104
|
+
portTracked.props.event = event;
|
|
105
|
+
}
|
|
99
106
|
}
|
|
100
107
|
}
|
|
101
108
|
|
|
@@ -136,26 +143,28 @@ function joinProperties(urlObj, sourceProps, separators) {
|
|
|
136
143
|
}
|
|
137
144
|
|
|
138
145
|
// copy tag ranges
|
|
139
|
-
const result = tracker.track(value);
|
|
140
146
|
let valIdx = 0;
|
|
141
147
|
sepIdx = 0;
|
|
142
148
|
let tags = [];
|
|
143
149
|
|
|
144
150
|
for (const prop of sourceProps) {
|
|
145
|
-
|
|
151
|
+
const trackedPropData = tracker.getData(urlObj[`_contrast_${prop}`]);
|
|
152
|
+
if (trackedPropData) {
|
|
146
153
|
tags = tagRangeUtil.addAll(
|
|
147
154
|
tags,
|
|
148
155
|
offsetTagRanges(
|
|
149
|
-
|
|
156
|
+
trackedPropData.tagRanges,
|
|
150
157
|
valIdx
|
|
151
158
|
)
|
|
152
159
|
);
|
|
153
160
|
}
|
|
154
161
|
valIdx += urlObj[prop].length + separators[sepIdx++].length;
|
|
155
162
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
163
|
+
const tracked = tracker.track(value);
|
|
164
|
+
if (tracked) {
|
|
165
|
+
tracked.props.tagRanges = tags;
|
|
166
|
+
return tracked.str;
|
|
167
|
+
}
|
|
159
168
|
}
|
|
160
169
|
|
|
161
170
|
/**
|
|
@@ -172,7 +181,8 @@ function setOriginTags(urlObj, stack, args, sourceEvent) {
|
|
|
172
181
|
//
|
|
173
182
|
|
|
174
183
|
const trackedOrigin = joinProperties(urlObj, SET_ORIGIN_TAGS, ['//', '']);
|
|
175
|
-
|
|
184
|
+
const trackedOriginData = tracker.getData(trackedOrigin);
|
|
185
|
+
if (!trackedOriginData || trackedOriginData.tagRanges.length === 0) {
|
|
176
186
|
return;
|
|
177
187
|
}
|
|
178
188
|
urlObj._contrast_origin = trackedOrigin;
|
|
@@ -180,14 +190,14 @@ function setOriginTags(urlObj, stack, args, sourceEvent) {
|
|
|
180
190
|
const event = createEvent(
|
|
181
191
|
'url.URL',
|
|
182
192
|
stack,
|
|
183
|
-
|
|
193
|
+
trackedOriginData.tagRanges,
|
|
184
194
|
trackedOrigin,
|
|
185
195
|
args,
|
|
186
196
|
urlObj
|
|
187
197
|
);
|
|
188
198
|
event.parents.push(sourceEvent);
|
|
189
|
-
event.tagRanges =
|
|
190
|
-
|
|
199
|
+
event.tagRanges = trackedOriginData.tagRanges;
|
|
200
|
+
trackedOriginData.event = event;
|
|
191
201
|
}
|
|
192
202
|
|
|
193
203
|
/**
|
|
@@ -221,7 +231,7 @@ function setHrefTags(urlObj, stack, args, sourceEvent) {
|
|
|
221
231
|
|
|
222
232
|
const joinedHref = joinProperties(urlObj, properties, separators);
|
|
223
233
|
const joinedHrefData = tracker.getData(joinedHref);
|
|
224
|
-
if (joinedHrefData.tagRanges.length === 0) {
|
|
234
|
+
if (!joinedHrefData || joinedHrefData.tagRanges.length === 0) {
|
|
225
235
|
return;
|
|
226
236
|
}
|
|
227
237
|
urlObj._contrast_href = joinedHref;
|
|
@@ -235,7 +245,7 @@ function setHrefTags(urlObj, stack, args, sourceEvent) {
|
|
|
235
245
|
);
|
|
236
246
|
event.parents.push(sourceEvent);
|
|
237
247
|
event.tagRanges = joinedHrefData.tagRanges;
|
|
238
|
-
|
|
248
|
+
joinedHrefData.event = event;
|
|
239
249
|
}
|
|
240
250
|
|
|
241
251
|
/**
|
|
@@ -300,21 +310,22 @@ function copyTagsSingleSource(sourceTagRanges, sourceEvent, data) {
|
|
|
300
310
|
copied = true;
|
|
301
311
|
const trackedKey = `_contrast_${key}`;
|
|
302
312
|
const tracked = tracker.track(val);
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
313
|
+
if (tracked) {
|
|
314
|
+
tracked.props.tagRanges = trimmed;
|
|
315
|
+
urlObj[trackedKey] = tracked.str;
|
|
316
|
+
|
|
317
|
+
// only create the stack once because stack creation is expensive
|
|
318
|
+
stack =
|
|
319
|
+
stack ||
|
|
320
|
+
stackFactory.createSnapshot({
|
|
321
|
+
constructorOpt: data.hooked
|
|
322
|
+
})();
|
|
323
|
+
|
|
324
|
+
event = createEvent('url.URL', stack, trimmed, val, args, urlObj);
|
|
325
|
+
event.parents.push(sourceEvent);
|
|
326
|
+
event.tagRanges = trimmed;
|
|
327
|
+
tracked.props.event = event;
|
|
328
|
+
}
|
|
318
329
|
}
|
|
319
330
|
|
|
320
331
|
if (!copied) {
|
|
@@ -351,10 +362,7 @@ function callUnwrapped(input) {
|
|
|
351
362
|
*/
|
|
352
363
|
function skipTracking(inputData, baseData) {
|
|
353
364
|
// if neither input or base are tracked we can just skip tracking
|
|
354
|
-
if (
|
|
355
|
-
(!inputData.tracked && baseData && !baseData.tracked) ||
|
|
356
|
-
(!inputData.tracked && !baseData)
|
|
357
|
-
) {
|
|
365
|
+
if (!inputData && !baseData) {
|
|
358
366
|
return true;
|
|
359
367
|
}
|
|
360
368
|
return false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
Copyright:
|
|
2
|
+
Copyright: 2022 Contrast Security, Inc
|
|
3
3
|
Contact: support@contrastsecurity.com
|
|
4
4
|
License: Commercial
|
|
5
5
|
|
|
@@ -266,7 +266,7 @@ const propagate = function propagate(util, data) {
|
|
|
266
266
|
};
|
|
267
267
|
|
|
268
268
|
const fmtStrMeta = tracker.getData(fmtStr);
|
|
269
|
-
if (fmtStrMeta
|
|
269
|
+
if (fmtStrMeta) {
|
|
270
270
|
resultMeta.fmtStrTagRanges = fmtStrMeta.tagRanges.map((tagRange) =>
|
|
271
271
|
tagRangeWithOriginals(
|
|
272
272
|
new TagRange(tagRange.start, tagRange.stop, tagRange.tag)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
Copyright:
|
|
2
|
+
Copyright: 2022 Contrast Security, Inc
|
|
3
3
|
Contact: support@contrastsecurity.com
|
|
4
4
|
License: Commercial
|
|
5
5
|
|
|
@@ -63,7 +63,7 @@ module.exports.handle = function handle() {
|
|
|
63
63
|
if (tracked) {
|
|
64
64
|
// it was behind a membrane
|
|
65
65
|
data.result[TRACKED] = tracked;
|
|
66
|
-
} else if (tracker.
|
|
66
|
+
} else if (tracker.getData(data.args[0])) {
|
|
67
67
|
// it was a tracked string
|
|
68
68
|
data.result[TRACKED] = data.args[0];
|
|
69
69
|
}
|
|
@@ -80,13 +80,13 @@ module.exports.handle = function handle() {
|
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
const sTracking = tracker.
|
|
83
|
+
const sTracking = tracker.getData(tracked);
|
|
84
84
|
// if the argument was a tracked string then the result should
|
|
85
85
|
// have the same tags. i don't know that the length of a string
|
|
86
86
|
// can change as a result of deserialize(serialize()) but best
|
|
87
87
|
// to be safe.
|
|
88
88
|
if (sTracking) {
|
|
89
|
-
const resultTracking = tracker.
|
|
89
|
+
const resultTracking = tracker.track(data.result);
|
|
90
90
|
if (!resultTracking) {
|
|
91
91
|
// there's nothing to do if tracking failed on the result. it should
|
|
92
92
|
// only do so on a zero-length string, but node works in mysterious ways.
|