@blazedpath/commons 0.2.2 → 0.3.1
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/README.md +4 -1
- package/dist/blz-base/health/index.d.ts +1 -0
- package/dist/blz-base/health/index.js +1 -0
- package/dist/blz-base/index.d.ts +108 -0
- package/dist/blz-base/index.js +1 -0
- package/dist/blz-cache/LruCache.d.ts +31 -0
- package/dist/blz-cache/LruCache.js +1 -0
- package/dist/blz-cache/index.d.ts +2 -0
- package/dist/blz-cache/index.js +1 -0
- package/dist/blz-config/index.d.ts +16 -0
- package/dist/blz-config/index.js +1 -0
- package/dist/blz-core/index.d.ts +32 -0
- package/dist/blz-core/index.js +1 -0
- package/dist/blz-cryptography/index.d.ts +2 -0
- package/dist/blz-cryptography/index.js +1 -0
- package/dist/blz-datetimes/index.d.ts +35 -0
- package/dist/blz-datetimes/index.js +1 -0
- package/dist/blz-file/fileService.d.ts +25 -0
- package/dist/blz-file/fileService.js +1 -0
- package/dist/blz-file/index.d.ts +2 -0
- package/dist/blz-file/index.js +1 -0
- package/dist/blz-file/index.test.js +1 -0
- package/dist/blz-file/lab.js +1 -0
- package/dist/blz-hazelcast/index.d.ts +25 -0
- package/dist/blz-hazelcast/index.js +1 -0
- package/dist/blz-hazelcast/lib/credentials.d.ts +10 -0
- package/dist/blz-hazelcast/lib/credentials.js +1 -0
- package/dist/blz-hazelcast/lib/credentialsFactory.d.ts +1 -0
- package/dist/blz-hazelcast/lib/credentialsFactory.js +1 -0
- package/dist/blz-hazelcast/lib/hazelcastCache.d.ts +27 -0
- package/dist/blz-hazelcast/lib/hazelcastCache.js +1 -0
- package/dist/blz-iterable/index.d.ts +49 -0
- package/dist/blz-iterable/index.js +1 -0
- package/dist/blz-json-schema/index.d.ts +1 -0
- package/dist/blz-json-schema/index.js +1 -0
- package/dist/blz-jwt/index.d.ts +12 -0
- package/dist/blz-jwt/index.js +1 -0
- package/dist/blz-kafka/index.d.ts +9 -0
- package/dist/blz-kafka/index.js +1 -0
- package/dist/blz-math/index.d.ts +22 -0
- package/dist/blz-math/index.js +1 -0
- package/dist/blz-mongodb/index.d.ts +28 -0
- package/dist/blz-mongodb/index.js +1 -0
- package/dist/blz-rds/__test__/scape.test.js +1 -0
- package/dist/blz-rds/blz-rds-executor.d.ts +4 -0
- package/dist/blz-rds/blz-rds-executor.js +1 -0
- package/dist/blz-rds/blz-rds-helper.d.ts +5 -0
- package/dist/blz-rds/blz-rds-helper.js +1 -0
- package/dist/blz-rds/commands/core/add.d.ts +2 -0
- package/dist/blz-rds/commands/core/add.js +1 -0
- package/dist/blz-rds/commands/core/and.d.ts +3 -0
- package/dist/blz-rds/commands/core/and.js +1 -0
- package/dist/blz-rds/commands/core/asc.d.ts +2 -0
- package/dist/blz-rds/commands/core/asc.js +1 -0
- package/dist/blz-rds/commands/core/avg.d.ts +2 -0
- package/dist/blz-rds/commands/core/avg.js +1 -0
- package/dist/blz-rds/commands/core/column-ref.d.ts +2 -0
- package/dist/blz-rds/commands/core/column-ref.js +1 -0
- package/dist/blz-rds/commands/core/count-distinct.d.ts +2 -0
- package/dist/blz-rds/commands/core/count-distinct.js +1 -0
- package/dist/blz-rds/commands/core/count.d.ts +2 -0
- package/dist/blz-rds/commands/core/count.js +1 -0
- package/dist/blz-rds/commands/core/decimal.d.ts +2 -0
- package/dist/blz-rds/commands/core/decimal.js +1 -0
- package/dist/blz-rds/commands/core/desc.d.ts +2 -0
- package/dist/blz-rds/commands/core/desc.js +1 -0
- package/dist/blz-rds/commands/core/distinct.d.ts +2 -0
- package/dist/blz-rds/commands/core/distinct.js +1 -0
- package/dist/blz-rds/commands/core/divide.d.ts +2 -0
- package/dist/blz-rds/commands/core/divide.js +1 -0
- package/dist/blz-rds/commands/core/embedded-exists.d.ts +3 -0
- package/dist/blz-rds/commands/core/embedded-exists.js +1 -0
- package/dist/blz-rds/commands/core/embedded-select.d.ts +2 -0
- package/dist/blz-rds/commands/core/embedded-select.js +1 -0
- package/dist/blz-rds/commands/core/equals.d.ts +3 -0
- package/dist/blz-rds/commands/core/equals.js +1 -0
- package/dist/blz-rds/commands/core/false.d.ts +2 -0
- package/dist/blz-rds/commands/core/false.js +1 -0
- package/dist/blz-rds/commands/core/greater-or-equal.d.ts +3 -0
- package/dist/blz-rds/commands/core/greater-or-equal.js +1 -0
- package/dist/blz-rds/commands/core/greater.d.ts +3 -0
- package/dist/blz-rds/commands/core/greater.js +1 -0
- package/dist/blz-rds/commands/core/in.d.ts +3 -0
- package/dist/blz-rds/commands/core/in.js +1 -0
- package/dist/blz-rds/commands/core/integer.d.ts +2 -0
- package/dist/blz-rds/commands/core/integer.js +1 -0
- package/dist/blz-rds/commands/core/is-not-null.d.ts +3 -0
- package/dist/blz-rds/commands/core/is-not-null.js +1 -0
- package/dist/blz-rds/commands/core/is-null-or-value.d.ts +3 -0
- package/dist/blz-rds/commands/core/is-null-or-value.js +1 -0
- package/dist/blz-rds/commands/core/is-null.d.ts +3 -0
- package/dist/blz-rds/commands/core/is-null.js +1 -0
- package/dist/blz-rds/commands/core/less-or-equal.d.ts +3 -0
- package/dist/blz-rds/commands/core/less-or-equal.js +1 -0
- package/dist/blz-rds/commands/core/less-unary.d.ts +2 -0
- package/dist/blz-rds/commands/core/less-unary.js +1 -0
- package/dist/blz-rds/commands/core/less.d.ts +3 -0
- package/dist/blz-rds/commands/core/less.js +1 -0
- package/dist/blz-rds/commands/core/like.d.ts +3 -0
- package/dist/blz-rds/commands/core/like.js +1 -0
- package/dist/blz-rds/commands/core/max.d.ts +2 -0
- package/dist/blz-rds/commands/core/max.js +1 -0
- package/dist/blz-rds/commands/core/min.d.ts +2 -0
- package/dist/blz-rds/commands/core/min.js +1 -0
- package/dist/blz-rds/commands/core/multiply.d.ts +2 -0
- package/dist/blz-rds/commands/core/multiply.js +1 -0
- package/dist/blz-rds/commands/core/not-equals.d.ts +3 -0
- package/dist/blz-rds/commands/core/not-equals.js +1 -0
- package/dist/blz-rds/commands/core/not-in.d.ts +3 -0
- package/dist/blz-rds/commands/core/not-in.js +1 -0
- package/dist/blz-rds/commands/core/not.d.ts +3 -0
- package/dist/blz-rds/commands/core/not.js +1 -0
- package/dist/blz-rds/commands/core/null.d.ts +2 -0
- package/dist/blz-rds/commands/core/null.js +1 -0
- package/dist/blz-rds/commands/core/nvl.d.ts +2 -0
- package/dist/blz-rds/commands/core/nvl.js +1 -0
- package/dist/blz-rds/commands/core/or.d.ts +3 -0
- package/dist/blz-rds/commands/core/or.js +1 -0
- package/dist/blz-rds/commands/core/parameter.d.ts +2 -0
- package/dist/blz-rds/commands/core/parameter.js +1 -0
- package/dist/blz-rds/commands/core/remainder.d.ts +2 -0
- package/dist/blz-rds/commands/core/remainder.js +1 -0
- package/dist/blz-rds/commands/core/string.d.ts +2 -0
- package/dist/blz-rds/commands/core/string.js +1 -0
- package/dist/blz-rds/commands/core/subtract.d.ts +2 -0
- package/dist/blz-rds/commands/core/subtract.js +1 -0
- package/dist/blz-rds/commands/core/sum.d.ts +2 -0
- package/dist/blz-rds/commands/core/sum.js +1 -0
- package/dist/blz-rds/commands/core/true.d.ts +2 -0
- package/dist/blz-rds/commands/core/true.js +1 -0
- package/dist/blz-rds/commands/core/tuple.d.ts +2 -0
- package/dist/blz-rds/commands/core/tuple.js +1 -0
- package/dist/blz-rds/commands/datetimes/add-days.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/add-days.js +1 -0
- package/dist/blz-rds/commands/datetimes/add-hours.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/add-hours.js +1 -0
- package/dist/blz-rds/commands/datetimes/add-milliseconds.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/add-milliseconds.js +1 -0
- package/dist/blz-rds/commands/datetimes/add-minutes.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/add-minutes.js +1 -0
- package/dist/blz-rds/commands/datetimes/add-months.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/add-months.js +1 -0
- package/dist/blz-rds/commands/datetimes/add-seconds.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/add-seconds.js +1 -0
- package/dist/blz-rds/commands/datetimes/add-years.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/add-years.js +1 -0
- package/dist/blz-rds/commands/datetimes/date-diff.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/date-diff.js +1 -0
- package/dist/blz-rds/commands/datetimes/date.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/date.js +1 -0
- package/dist/blz-rds/commands/datetimes/datetime-diff.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/datetime-diff.js +1 -0
- package/dist/blz-rds/commands/datetimes/datetime.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/datetime.js +1 -0
- package/dist/blz-rds/commands/datetimes/day.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/day.js +1 -0
- package/dist/blz-rds/commands/datetimes/hour.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/hour.js +1 -0
- package/dist/blz-rds/commands/datetimes/millisecond.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/millisecond.js +1 -0
- package/dist/blz-rds/commands/datetimes/minute.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/minute.js +1 -0
- package/dist/blz-rds/commands/datetimes/month-text.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/month-text.js +1 -0
- package/dist/blz-rds/commands/datetimes/month.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/month.js +1 -0
- package/dist/blz-rds/commands/datetimes/now.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/now.js +1 -0
- package/dist/blz-rds/commands/datetimes/second.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/second.js +1 -0
- package/dist/blz-rds/commands/datetimes/subtract-days.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/subtract-days.js +1 -0
- package/dist/blz-rds/commands/datetimes/subtract-hours.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/subtract-hours.js +1 -0
- package/dist/blz-rds/commands/datetimes/subtract-milliseconds.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/subtract-milliseconds.js +1 -0
- package/dist/blz-rds/commands/datetimes/subtract-minutes.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/subtract-minutes.js +1 -0
- package/dist/blz-rds/commands/datetimes/subtract-seconds.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/subtract-seconds.js +1 -0
- package/dist/blz-rds/commands/datetimes/time-diff.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/time-diff.js +1 -0
- package/dist/blz-rds/commands/datetimes/time.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/time.js +1 -0
- package/dist/blz-rds/commands/datetimes/today.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/today.js +1 -0
- package/dist/blz-rds/commands/datetimes/week-day-text.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/week-day-text.js +1 -0
- package/dist/blz-rds/commands/datetimes/week-day.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/week-day.js +1 -0
- package/dist/blz-rds/commands/datetimes/week.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/week.js +1 -0
- package/dist/blz-rds/commands/datetimes/year.d.ts +2 -0
- package/dist/blz-rds/commands/datetimes/year.js +1 -0
- package/dist/blz-rds/commands/math/abs.d.ts +2 -0
- package/dist/blz-rds/commands/math/abs.js +1 -0
- package/dist/blz-rds/commands/math/acos.d.ts +2 -0
- package/dist/blz-rds/commands/math/acos.js +1 -0
- package/dist/blz-rds/commands/math/asin.d.ts +2 -0
- package/dist/blz-rds/commands/math/asin.js +1 -0
- package/dist/blz-rds/commands/math/atan.d.ts +2 -0
- package/dist/blz-rds/commands/math/atan.js +1 -0
- package/dist/blz-rds/commands/math/atan2.d.ts +2 -0
- package/dist/blz-rds/commands/math/atan2.js +1 -0
- package/dist/blz-rds/commands/math/ceil.d.ts +2 -0
- package/dist/blz-rds/commands/math/ceil.js +1 -0
- package/dist/blz-rds/commands/math/cos.d.ts +2 -0
- package/dist/blz-rds/commands/math/cos.js +1 -0
- package/dist/blz-rds/commands/math/cosh.d.ts +2 -0
- package/dist/blz-rds/commands/math/cosh.js +1 -0
- package/dist/blz-rds/commands/math/exp.d.ts +2 -0
- package/dist/blz-rds/commands/math/exp.js +1 -0
- package/dist/blz-rds/commands/math/floor.d.ts +2 -0
- package/dist/blz-rds/commands/math/floor.js +1 -0
- package/dist/blz-rds/commands/math/log.d.ts +2 -0
- package/dist/blz-rds/commands/math/log.js +1 -0
- package/dist/blz-rds/commands/math/log10.d.ts +2 -0
- package/dist/blz-rds/commands/math/log10.js +1 -0
- package/dist/blz-rds/commands/math/pow.d.ts +2 -0
- package/dist/blz-rds/commands/math/pow.js +1 -0
- package/dist/blz-rds/commands/math/random.d.ts +2 -0
- package/dist/blz-rds/commands/math/random.js +1 -0
- package/dist/blz-rds/commands/math/round.d.ts +2 -0
- package/dist/blz-rds/commands/math/round.js +1 -0
- package/dist/blz-rds/commands/math/sign.d.ts +2 -0
- package/dist/blz-rds/commands/math/sign.js +1 -0
- package/dist/blz-rds/commands/math/sin.d.ts +2 -0
- package/dist/blz-rds/commands/math/sin.js +1 -0
- package/dist/blz-rds/commands/math/sinh.d.ts +2 -0
- package/dist/blz-rds/commands/math/sinh.js +1 -0
- package/dist/blz-rds/commands/math/sqrt.d.ts +2 -0
- package/dist/blz-rds/commands/math/sqrt.js +1 -0
- package/dist/blz-rds/commands/math/tan.d.ts +2 -0
- package/dist/blz-rds/commands/math/tan.js +1 -0
- package/dist/blz-rds/commands/math/tanh.d.ts +2 -0
- package/dist/blz-rds/commands/math/tanh.js +1 -0
- package/dist/blz-rds/commands/math/trunc.d.ts +2 -0
- package/dist/blz-rds/commands/math/trunc.js +1 -0
- package/dist/blz-rds/commands/strings/concat.d.ts +2 -0
- package/dist/blz-rds/commands/strings/concat.js +1 -0
- package/dist/blz-rds/commands/strings/contains.d.ts +3 -0
- package/dist/blz-rds/commands/strings/contains.js +1 -0
- package/dist/blz-rds/commands/strings/ends-with.d.ts +3 -0
- package/dist/blz-rds/commands/strings/ends-with.js +1 -0
- package/dist/blz-rds/commands/strings/index-of.d.ts +2 -0
- package/dist/blz-rds/commands/strings/index-of.js +1 -0
- package/dist/blz-rds/commands/strings/is-null-or-empty.d.ts +3 -0
- package/dist/blz-rds/commands/strings/is-null-or-empty.js +1 -0
- package/dist/blz-rds/commands/strings/is-null-or-white-space.d.ts +3 -0
- package/dist/blz-rds/commands/strings/is-null-or-white-space.js +1 -0
- package/dist/blz-rds/commands/strings/join.d.ts +2 -0
- package/dist/blz-rds/commands/strings/join.js +1 -0
- package/dist/blz-rds/commands/strings/last-index-of.d.ts +2 -0
- package/dist/blz-rds/commands/strings/last-index-of.js +1 -0
- package/dist/blz-rds/commands/strings/length.d.ts +2 -0
- package/dist/blz-rds/commands/strings/length.js +1 -0
- package/dist/blz-rds/commands/strings/pad-left.d.ts +2 -0
- package/dist/blz-rds/commands/strings/pad-left.js +1 -0
- package/dist/blz-rds/commands/strings/pad-right.d.ts +2 -0
- package/dist/blz-rds/commands/strings/pad-right.js +1 -0
- package/dist/blz-rds/commands/strings/replace.d.ts +2 -0
- package/dist/blz-rds/commands/strings/replace.js +1 -0
- package/dist/blz-rds/commands/strings/starts-with.d.ts +3 -0
- package/dist/blz-rds/commands/strings/starts-with.js +1 -0
- package/dist/blz-rds/commands/strings/substring.d.ts +2 -0
- package/dist/blz-rds/commands/strings/substring.js +1 -0
- package/dist/blz-rds/commands/strings/to-lower.d.ts +2 -0
- package/dist/blz-rds/commands/strings/to-lower.js +1 -0
- package/dist/blz-rds/commands/strings/to-upper.d.ts +2 -0
- package/dist/blz-rds/commands/strings/to-upper.js +1 -0
- package/dist/blz-rds/commands/strings/trim-end.d.ts +2 -0
- package/dist/blz-rds/commands/strings/trim-end.js +1 -0
- package/dist/blz-rds/commands/strings/trim-start.d.ts +2 -0
- package/dist/blz-rds/commands/strings/trim-start.js +1 -0
- package/dist/blz-rds/commands/strings/trim.d.ts +2 -0
- package/dist/blz-rds/commands/strings/trim.js +1 -0
- package/dist/blz-rds/index.d.ts +53 -0
- package/dist/blz-rds/index.js +1 -0
- package/dist/blz-rds-mysql/base.d.ts +83 -0
- package/dist/blz-rds-mysql/base.js +1 -0
- package/dist/blz-rds-mysql/connection-manager.d.ts +8 -0
- package/dist/blz-rds-mysql/connection-manager.js +1 -0
- package/dist/blz-rds-mysql/execute-bulk-insert.d.ts +2 -0
- package/dist/blz-rds-mysql/execute-bulk-insert.js +1 -0
- package/dist/blz-rds-mysql/execute-bulk-merge.d.ts +2 -0
- package/dist/blz-rds-mysql/execute-bulk-merge.js +1 -0
- package/dist/blz-rds-mysql/execute-non-query.d.ts +14 -0
- package/dist/blz-rds-mysql/execute-non-query.js +1 -0
- package/dist/blz-rds-mysql/execute-query.d.ts +11 -0
- package/dist/blz-rds-mysql/execute-query.js +1 -0
- package/dist/blz-rds-mysql/index.d.ts +9 -0
- package/dist/blz-rds-mysql/index.js +1 -0
- package/dist/blz-rds-mysql/stored-procedure.d.ts +19 -0
- package/dist/blz-rds-mysql/stored-procedure.js +1 -0
- package/dist/blz-rds-mysqlx/base.d.ts +83 -0
- package/dist/blz-rds-mysqlx/base.js +1 -0
- package/dist/blz-rds-mysqlx/connection-manager.d.ts +6 -0
- package/dist/blz-rds-mysqlx/connection-manager.js +1 -0
- package/dist/blz-rds-mysqlx/execute-bulk-insert.d.ts +2 -0
- package/dist/blz-rds-mysqlx/execute-bulk-insert.js +1 -0
- package/dist/blz-rds-mysqlx/execute-bulk-merge.d.ts +2 -0
- package/dist/blz-rds-mysqlx/execute-bulk-merge.js +1 -0
- package/dist/blz-rds-mysqlx/execute-non-query.d.ts +4 -0
- package/dist/blz-rds-mysqlx/execute-non-query.js +1 -0
- package/dist/blz-rds-mysqlx/execute-query.d.ts +7 -0
- package/dist/blz-rds-mysqlx/execute-query.js +1 -0
- package/dist/blz-rds-mysqlx/index.d.ts +9 -0
- package/dist/blz-rds-mysqlx/index.js +1 -0
- package/dist/blz-rds-mysqlx/stored-procedure.d.ts +20 -0
- package/dist/blz-rds-mysqlx/stored-procedure.js +1 -0
- package/dist/blz-rds-oracle/index.d.ts +25 -0
- package/dist/blz-rds-oracle/index.js +1 -0
- package/dist/blz-rds-postgres/base.d.ts +94 -0
- package/dist/blz-rds-postgres/base.js +1 -0
- package/dist/blz-rds-postgres/connection-manager.d.ts +6 -0
- package/dist/blz-rds-postgres/connection-manager.js +1 -0
- package/dist/blz-rds-postgres/execute-bulk-insert.d.ts +5 -0
- package/dist/blz-rds-postgres/execute-bulk-insert.js +1 -0
- package/dist/blz-rds-postgres/execute-bulk-merge.d.ts +4 -0
- package/dist/blz-rds-postgres/execute-bulk-merge.js +1 -0
- package/dist/blz-rds-postgres/execute-non-query.d.ts +12 -0
- package/dist/blz-rds-postgres/execute-non-query.js +1 -0
- package/dist/blz-rds-postgres/execute-query.d.ts +4 -0
- package/dist/blz-rds-postgres/execute-query.js +1 -0
- package/dist/blz-rds-postgres/index.d.ts +9 -0
- package/dist/blz-rds-postgres/index.js +1 -0
- package/dist/blz-rds-postgres/result-set.js +1 -0
- package/dist/blz-rds-postgres/stored-procedure.d.ts +19 -0
- package/dist/blz-rds-postgres/stored-procedure.js +1 -0
- package/dist/blz-redis/index.d.ts +31 -0
- package/dist/blz-redis/index.js +1 -0
- package/dist/blz-redis/lib/redisCache.d.ts +33 -0
- package/dist/blz-redis/lib/redisCache.js +1 -0
- package/dist/blz-regex/index.d.ts +3 -0
- package/dist/blz-regex/index.js +1 -0
- package/dist/blz-security/__test__/autorization.test.js +1 -0
- package/dist/blz-security/__test__/autorizationKpn.test.js +1 -0
- package/dist/blz-security/__test__/orderManagement.test.js +1 -0
- package/dist/blz-security/__test__/secureUrl.test.js +1 -0
- package/dist/blz-security/__test__/solveMergeRule.test.js +1 -0
- package/dist/blz-security/__test__/sqlInjectionGuard.test.js +1 -0
- package/dist/blz-security/__test__/xssGuard.test.js +1 -0
- package/dist/blz-security/authorizationService.d.ts +42 -0
- package/dist/blz-security/authorizationService.js +2 -0
- package/dist/blz-security/config/global.js +1 -0
- package/dist/blz-security/filescanner/index.d.ts +24 -0
- package/dist/blz-security/filescanner/index.js +1 -0
- package/dist/blz-security/helpers/consts.d.ts +28 -0
- package/dist/blz-security/helpers/consts.js +1 -0
- package/dist/blz-security/helpers/utils.d.ts +82 -0
- package/dist/blz-security/helpers/utils.js +1 -0
- package/dist/blz-security/implementations/cache.d.ts +58 -0
- package/dist/blz-security/implementations/cache.js +1 -0
- package/dist/blz-security/implementations/oidc.d.ts +100 -0
- package/dist/blz-security/implementations/oidc.js +1 -0
- package/dist/blz-security/implementations/pkceCacheStore.d.ts +2 -0
- package/dist/blz-security/implementations/pkceCacheStore.js +1 -0
- package/dist/blz-security/implementations/saml.js +1 -0
- package/dist/blz-security/implementations/uma.d.ts +31 -0
- package/dist/blz-security/implementations/uma.js +1 -0
- package/dist/blz-security/implementations/webAuthn.js +1 -0
- package/dist/blz-security/implementations/wstg.js +1 -0
- package/dist/blz-security/index.d.ts +4 -0
- package/dist/blz-security/index.js +2 -0
- package/dist/blz-security/lab/index.js +1 -0
- package/dist/blz-security/middleware/HapiServerAzureAd.d.ts +26 -0
- package/dist/blz-security/middleware/HapiServerAzureAd.js +1 -0
- package/dist/blz-security/middleware/HapiServerKeycloak.d.ts +47 -0
- package/dist/blz-security/middleware/HapiServerKeycloak.js +1 -0
- package/dist/blz-security/middleware/HapiServerSimToken.d.ts +13 -0
- package/dist/blz-security/middleware/HapiServerSimToken.js +1 -0
- package/dist/blz-security/middleware/hapi.d.ts +14 -0
- package/dist/blz-security/middleware/hapi.js +1 -0
- package/dist/blz-security/middleware/hapiServer.js +1 -0
- package/dist/blz-security/navigationMemoryRepository.d.ts +6 -0
- package/dist/blz-security/navigationMemoryRepository.js +1 -0
- package/dist/blz-security/navigationMongoDbRepository.d.ts +15 -0
- package/dist/blz-security/navigationMongoDbRepository.js +1 -0
- package/dist/blz-security/secureUrlService.d.ts +7 -0
- package/dist/blz-security/secureUrlService.js +1 -0
- package/dist/blz-security/securityService.d.ts +72 -0
- package/dist/blz-security/securityService.js +1 -0
- package/dist/blz-security/sqlInjectionGuard.d.ts +37 -0
- package/dist/blz-security/sqlInjectionGuard.js +1 -0
- package/dist/blz-security/xssGuard.d.ts +14 -0
- package/dist/blz-security/xssGuard.js +1 -0
- package/dist/blz-strings/index.d.ts +42 -0
- package/dist/blz-strings/index.js +1 -0
- package/dist/blz-uuid/index.d.ts +1 -0
- package/dist/blz-uuid/index.js +1 -0
- package/dist/blz-yaml/index.d.ts +2 -0
- package/dist/blz-yaml/index.js +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +1 -0
- package/dist/process-managers/index.d.ts +25 -0
- package/dist/process-managers/index.js +1 -0
- package/package.json +52 -41
- package/blz-base/health/index.js +0 -215
- package/blz-base/index.js +0 -1466
- package/blz-cache/LruCache.js +0 -44
- package/blz-cache/index.js +0 -29
- package/blz-config/index.js +0 -434
- package/blz-core/index.js +0 -364
- package/blz-cryptography/index.js +0 -54
- package/blz-datetimes/index.js +0 -356
- package/blz-file/example.dat +0 -2545
- package/blz-file/fileService.js +0 -205
- package/blz-file/index.js +0 -94
- package/blz-file/index.test.js +0 -31
- package/blz-file/lab.js +0 -33
- package/blz-hazelcast/index.js +0 -189
- package/blz-hazelcast/lib/credentials.js +0 -25
- package/blz-hazelcast/lib/credentialsFactory.js +0 -12
- package/blz-hazelcast/lib/hazelcastCache.js +0 -234
- package/blz-iterable/index.js +0 -446
- package/blz-json-schema/index.js +0 -11
- package/blz-jwt/index.js +0 -121
- package/blz-kafka/index.js +0 -522
- package/blz-math/index.js +0 -131
- package/blz-mongodb/index.js +0 -326
- package/blz-rds/__test__/scape.test.js +0 -58
- package/blz-rds/blz-rds-executor.js +0 -578
- package/blz-rds/blz-rds-helper.js +0 -310
- package/blz-rds/commands/core/add.js +0 -13
- package/blz-rds/commands/core/and.js +0 -18
- package/blz-rds/commands/core/asc.js +0 -10
- package/blz-rds/commands/core/avg.js +0 -10
- package/blz-rds/commands/core/column-ref.js +0 -8
- package/blz-rds/commands/core/count-distinct.js +0 -10
- package/blz-rds/commands/core/count.js +0 -10
- package/blz-rds/commands/core/decimal.js +0 -8
- package/blz-rds/commands/core/desc.js +0 -10
- package/blz-rds/commands/core/distinct.js +0 -10
- package/blz-rds/commands/core/divide.js +0 -11
- package/blz-rds/commands/core/embedded-exists.js +0 -17
- package/blz-rds/commands/core/embedded-select.js +0 -17
- package/blz-rds/commands/core/equals.js +0 -9
- package/blz-rds/commands/core/false.js +0 -8
- package/blz-rds/commands/core/greater-or-equal.js +0 -9
- package/blz-rds/commands/core/greater.js +0 -9
- package/blz-rds/commands/core/in.js +0 -9
- package/blz-rds/commands/core/integer.js +0 -8
- package/blz-rds/commands/core/is-not-null.js +0 -11
- package/blz-rds/commands/core/is-null-or-value.js +0 -10
- package/blz-rds/commands/core/is-null.js +0 -11
- package/blz-rds/commands/core/less-or-equal.js +0 -9
- package/blz-rds/commands/core/less-unary.js +0 -12
- package/blz-rds/commands/core/less.js +0 -9
- package/blz-rds/commands/core/like.js +0 -12
- package/blz-rds/commands/core/max.js +0 -10
- package/blz-rds/commands/core/min.js +0 -10
- package/blz-rds/commands/core/multiply.js +0 -13
- package/blz-rds/commands/core/not-equals.js +0 -9
- package/blz-rds/commands/core/not-in.js +0 -9
- package/blz-rds/commands/core/not.js +0 -13
- package/blz-rds/commands/core/null.js +0 -8
- package/blz-rds/commands/core/nvl.js +0 -11
- package/blz-rds/commands/core/or.js +0 -13
- package/blz-rds/commands/core/parameter.js +0 -34
- package/blz-rds/commands/core/remainder.js +0 -16
- package/blz-rds/commands/core/string.js +0 -8
- package/blz-rds/commands/core/subtract.js +0 -13
- package/blz-rds/commands/core/sum.js +0 -10
- package/blz-rds/commands/core/true.js +0 -8
- package/blz-rds/commands/core/tuple.js +0 -13
- package/blz-rds/commands/datetimes/add-days.js +0 -11
- package/blz-rds/commands/datetimes/add-hours.js +0 -11
- package/blz-rds/commands/datetimes/add-milliseconds.js +0 -11
- package/blz-rds/commands/datetimes/add-minutes.js +0 -11
- package/blz-rds/commands/datetimes/add-months.js +0 -11
- package/blz-rds/commands/datetimes/add-seconds.js +0 -11
- package/blz-rds/commands/datetimes/add-years.js +0 -11
- package/blz-rds/commands/datetimes/date-diff.js +0 -11
- package/blz-rds/commands/datetimes/date.js +0 -12
- package/blz-rds/commands/datetimes/datetime-diff.js +0 -11
- package/blz-rds/commands/datetimes/datetime.js +0 -15
- package/blz-rds/commands/datetimes/day.js +0 -10
- package/blz-rds/commands/datetimes/hour.js +0 -10
- package/blz-rds/commands/datetimes/millisecond.js +0 -10
- package/blz-rds/commands/datetimes/minute.js +0 -10
- package/blz-rds/commands/datetimes/month-text.js +0 -10
- package/blz-rds/commands/datetimes/month.js +0 -10
- package/blz-rds/commands/datetimes/now.js +0 -9
- package/blz-rds/commands/datetimes/second.js +0 -10
- package/blz-rds/commands/datetimes/subtract-days.js +0 -11
- package/blz-rds/commands/datetimes/subtract-hours.js +0 -11
- package/blz-rds/commands/datetimes/subtract-milliseconds.js +0 -11
- package/blz-rds/commands/datetimes/subtract-minutes.js +0 -11
- package/blz-rds/commands/datetimes/subtract-seconds.js +0 -11
- package/blz-rds/commands/datetimes/time-diff.js +0 -11
- package/blz-rds/commands/datetimes/time.js +0 -13
- package/blz-rds/commands/datetimes/today.js +0 -9
- package/blz-rds/commands/datetimes/week-day-text.js +0 -10
- package/blz-rds/commands/datetimes/week-day.js +0 -10
- package/blz-rds/commands/datetimes/week.js +0 -10
- package/blz-rds/commands/datetimes/year.js +0 -10
- package/blz-rds/commands/math/abs.js +0 -10
- package/blz-rds/commands/math/acos.js +0 -10
- package/blz-rds/commands/math/asin.js +0 -10
- package/blz-rds/commands/math/atan.js +0 -10
- package/blz-rds/commands/math/atan2.js +0 -11
- package/blz-rds/commands/math/ceil.js +0 -10
- package/blz-rds/commands/math/cos.js +0 -10
- package/blz-rds/commands/math/cosh.js +0 -10
- package/blz-rds/commands/math/exp.js +0 -10
- package/blz-rds/commands/math/floor.js +0 -10
- package/blz-rds/commands/math/log.js +0 -18
- package/blz-rds/commands/math/log10.js +0 -10
- package/blz-rds/commands/math/pow.js +0 -11
- package/blz-rds/commands/math/random.js +0 -9
- package/blz-rds/commands/math/round.js +0 -18
- package/blz-rds/commands/math/sign.js +0 -10
- package/blz-rds/commands/math/sin.js +0 -10
- package/blz-rds/commands/math/sinh.js +0 -10
- package/blz-rds/commands/math/sqrt.js +0 -10
- package/blz-rds/commands/math/tan.js +0 -10
- package/blz-rds/commands/math/tanh.js +0 -10
- package/blz-rds/commands/math/trunc.js +0 -18
- package/blz-rds/commands/strings/concat.js +0 -20
- package/blz-rds/commands/strings/contains.js +0 -12
- package/blz-rds/commands/strings/ends-with.js +0 -12
- package/blz-rds/commands/strings/index-of.js +0 -11
- package/blz-rds/commands/strings/is-null-or-empty.js +0 -11
- package/blz-rds/commands/strings/is-null-or-white-space.js +0 -11
- package/blz-rds/commands/strings/join.js +0 -22
- package/blz-rds/commands/strings/last-index-of.js +0 -11
- package/blz-rds/commands/strings/length.js +0 -10
- package/blz-rds/commands/strings/pad-left.js +0 -20
- package/blz-rds/commands/strings/pad-right.js +0 -20
- package/blz-rds/commands/strings/replace.js +0 -12
- package/blz-rds/commands/strings/starts-with.js +0 -12
- package/blz-rds/commands/strings/substring.js +0 -12
- package/blz-rds/commands/strings/to-lower.js +0 -10
- package/blz-rds/commands/strings/to-upper.js +0 -10
- package/blz-rds/commands/strings/trim-end.js +0 -10
- package/blz-rds/commands/strings/trim-start.js +0 -10
- package/blz-rds/commands/strings/trim.js +0 -10
- package/blz-rds/index.js +0 -744
- package/blz-rds-mysql/base.js +0 -857
- package/blz-rds-mysql/connection-manager.js +0 -129
- package/blz-rds-mysql/execute-bulk-insert.js +0 -35
- package/blz-rds-mysql/execute-bulk-merge.js +0 -45
- package/blz-rds-mysql/execute-non-query.js +0 -34
- package/blz-rds-mysql/execute-query.js +0 -50
- package/blz-rds-mysql/index.js +0 -41
- package/blz-rds-mysql/stored-procedure.js +0 -207
- package/blz-rds-mysqlx/base.js +0 -846
- package/blz-rds-mysqlx/connection-manager.js +0 -141
- package/blz-rds-mysqlx/execute-bulk-insert.js +0 -35
- package/blz-rds-mysqlx/execute-bulk-merge.js +0 -45
- package/blz-rds-mysqlx/execute-non-query.js +0 -29
- package/blz-rds-mysqlx/execute-query.js +0 -39
- package/blz-rds-mysqlx/index.js +0 -41
- package/blz-rds-mysqlx/stored-procedure.js +0 -179
- package/blz-rds-oracle/index.js +0 -539
- package/blz-rds-postgres/base.js +0 -861
- package/blz-rds-postgres/connection-manager.js +0 -225
- package/blz-rds-postgres/execute-bulk-insert.js +0 -81
- package/blz-rds-postgres/execute-bulk-merge.js +0 -93
- package/blz-rds-postgres/execute-non-query.js +0 -23
- package/blz-rds-postgres/execute-query.js +0 -37
- package/blz-rds-postgres/index.js +0 -41
- package/blz-rds-postgres/result-set.js +0 -51
- package/blz-rds-postgres/stored-procedure.js +0 -116
- package/blz-redis/index.js +0 -217
- package/blz-redis/lib/redisCache.js +0 -265
- package/blz-regex/index.js +0 -25
- package/blz-security/.eslintrc.js +0 -15
- package/blz-security/__test__/AuthorizationKpn.yaml +0 -1149
- package/blz-security/__test__/FinancingSetting.yaml +0 -177
- package/blz-security/__test__/KpnConfigPortal.yaml +0 -330
- package/blz-security/__test__/OrderManagement.yaml +0 -5190
- package/blz-security/__test__/Security.yaml +0 -128
- package/blz-security/__test__/autorization.test.js +0 -105
- package/blz-security/__test__/autorizationKpn.test.js +0 -42
- package/blz-security/__test__/orderManagement.test.js +0 -26
- package/blz-security/__test__/secureUrl.test.js +0 -79
- package/blz-security/__test__/solveMergeRule.test.js +0 -109
- package/blz-security/__test__/sqlInjectionGuard.test.js +0 -203
- package/blz-security/__test__/xssGuard.test.js +0 -204
- package/blz-security/authorizationService.js +0 -537
- package/blz-security/config/global.js +0 -8
- package/blz-security/config/welcome +0 -8
- package/blz-security/doc/README.md +0 -75
- package/blz-security/filescanner/index.js +0 -46
- package/blz-security/helpers/consts.js +0 -229
- package/blz-security/helpers/utils.js +0 -267
- package/blz-security/implementations/cache.js +0 -90
- package/blz-security/implementations/oidc.js +0 -404
- package/blz-security/implementations/pkceCacheStore.js +0 -23
- package/blz-security/implementations/saml.js +0 -10
- package/blz-security/implementations/uma.js +0 -63
- package/blz-security/implementations/webAuthn.js +0 -9
- package/blz-security/implementations/wstg.js +0 -72
- package/blz-security/index.js +0 -77
- package/blz-security/lab/index.js +0 -43
- package/blz-security/middleware/HapiServerAzureAd.js +0 -681
- package/blz-security/middleware/HapiServerKeycloak.js +0 -876
- package/blz-security/middleware/HapiServerSimToken.js +0 -286
- package/blz-security/middleware/hapi.js +0 -555
- package/blz-security/middleware/hapiServer.js +0 -1008
- package/blz-security/navigationMemoryRepository.js +0 -15
- package/blz-security/navigationMongoDbRepository.js +0 -73
- package/blz-security/secureUrlService.js +0 -47
- package/blz-security/securityService.js +0 -413
- package/blz-security/sqlInjectionGuard.js +0 -162
- package/blz-security/templates/forbidden.html +0 -0
- package/blz-security/templates/session-iframe-azure-ad.html +0 -7
- package/blz-security/templates/session-iframe.html +0 -73
- package/blz-security/templates/unauthorized.html +0 -1
- package/blz-security/xssGuard.js +0 -87
- package/blz-strings/index.js +0 -167
- package/blz-uuid/index.js +0 -7
- package/blz-yaml/index.js +0 -19
- package/index.js +0 -84
- package/process-managers/index.js +0 -422
- /package/{blz-rds-mysql → dist/blz-rds-mysql}/syntaxis.json +0 -0
- /package/{blz-rds-mysqlx → dist/blz-rds-mysqlx}/syntaxis.json +0 -0
- /package/{blz-rds-oracle → dist/blz-rds-oracle}/syntaxis.json +0 -0
- /package/{blz-rds-postgres → dist/blz-rds-postgres}/syntaxis.json +0 -0
- /package/{blz-security → dist/blz-security}/lab/ConfigurationAdmin.agent.json +0 -0
- /package/{blz-security → dist/blz-security}/lab/frontend.json +0 -0
- /package/{blz-security → dist/blz-security}/lab/result.json +0 -0
- /package/{blz-security → dist/blz-security}/lab/resultOnWeb.json +0 -0
- /package/{blz-security → dist/blz-security}/lab/rules.json +0 -0
- /package/{blz-security → dist/blz-security}/lab/securityRules.json +0 -0
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
const { z } = require('zod');
|
|
2
|
-
module.exports = class SqlInjectionGuard {
|
|
3
|
-
constructor(logger = console) {
|
|
4
|
-
this.logger = logger;
|
|
5
|
-
this._initialized = false;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
_initialize() {
|
|
9
|
-
if (this._initialized) return;
|
|
10
|
-
this._initialized = true;
|
|
11
|
-
const allowedPatternsEnv = process.env.blz_securityApiSanitizeAllowedSqlInputPatterns;
|
|
12
|
-
const paramPatternsEnv = process.env.blz_securityApiSanitizeDangerousParamPatterns;
|
|
13
|
-
const sqlPatternsEnv = process.env.blz_securityApiSanitizeDangerousSqlPatterns;
|
|
14
|
-
this.onlyLog = process.env.blz_securityApiSanitizeOnlyLog === 'true';
|
|
15
|
-
const parseRegexArray = (input) => {
|
|
16
|
-
try {
|
|
17
|
-
if (input == undefined || input == null) return null
|
|
18
|
-
const rawList = JSON.parse(input); // must be an array of strings type ["--", "\\bselect\\b.+\\bfrom\\b"]
|
|
19
|
-
return rawList.map(pattern => new RegExp(pattern, 'i'));
|
|
20
|
-
} catch {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
this.dangerousParamPatterns =
|
|
25
|
-
parseRegexArray(paramPatternsEnv) || [
|
|
26
|
-
/--/i,
|
|
27
|
-
/\/\*/i,
|
|
28
|
-
/\*\//i,
|
|
29
|
-
/\bor\b\s+\w+\s*=/i,
|
|
30
|
-
/\bor\b\s+.*?=.*?/i,
|
|
31
|
-
/\bor\b\s+'.*?'\s*=\s*'.*?'/i,
|
|
32
|
-
/\bor\b\s+\w+\s*like/i,
|
|
33
|
-
/\band\b\s+\w+\s*=/i,
|
|
34
|
-
/\band\b\s+\w+\s*like/i,
|
|
35
|
-
/\bselect\b[\s\S]+?\bfrom\b/i,
|
|
36
|
-
/\bunion\s+select\b/i,
|
|
37
|
-
/\bdrop\s+table\b/i,
|
|
38
|
-
/\binsert\s+into\b/i,
|
|
39
|
-
/\bupdate\b\s+\w+\s+\bset\b[\s\S]*?=/i,
|
|
40
|
-
/\bdelete\s+from\b/i,
|
|
41
|
-
/\bpg_sleep\s*\(/i,
|
|
42
|
-
/\bdbms_lock\.sleep\s*\(/i,
|
|
43
|
-
/\bexec\s*\(/i,
|
|
44
|
-
/\bexecute\s*\(/i
|
|
45
|
-
];
|
|
46
|
-
|
|
47
|
-
this.dangerousSqlPatterns =
|
|
48
|
-
parseRegexArray(sqlPatternsEnv) || [
|
|
49
|
-
/;\s*drop\b/i,
|
|
50
|
-
/;\s*truncate\b/i,
|
|
51
|
-
/\bpg_sleep\s*\(/i,
|
|
52
|
-
/\bdbms_lock\.sleep\s*\(/i,
|
|
53
|
-
/\bexec(ute)?\s*(\(|\s)/i,
|
|
54
|
-
/\binformation_schema\b/i,
|
|
55
|
-
/\bpg_catalog\b/i,
|
|
56
|
-
];
|
|
57
|
-
|
|
58
|
-
this.allowedInputPatterns =
|
|
59
|
-
parseRegexArray(allowedPatternsEnv) || [
|
|
60
|
-
new RegExp('^[^<>]*<$', 'i'),
|
|
61
|
-
new RegExp('^>[^<>]*$', 'i')
|
|
62
|
-
];
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
// Define a schema for each param object
|
|
66
|
-
this.paramSchema = z.object({
|
|
67
|
-
name: z.string(),
|
|
68
|
-
value: z.any(), // value can be string, number, etc.
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
// Schema for the full list
|
|
72
|
-
this.paramsSchema = z.array(this.paramSchema);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
isAllowedByWhitelist(value) {
|
|
76
|
-
return this.allowedInputPatterns.some(pattern => pattern.test(value));
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
validateParamValue(name, value) {
|
|
80
|
-
this. _initialize()
|
|
81
|
-
if (typeof value !== 'string') return;
|
|
82
|
-
const trimmed = value.trim();
|
|
83
|
-
if (this.isAllowedByWhitelist(trimmed)) return
|
|
84
|
-
// Always check for dangerous SQL injection patterns
|
|
85
|
-
for (const pattern of this.dangerousParamPatterns) {
|
|
86
|
-
if (pattern.test(trimmed)) {
|
|
87
|
-
const message = `Potential SQL injection in parameter "${name}": ${value}`;
|
|
88
|
-
if (this.onlyLog) {
|
|
89
|
-
this.logger?.warn?.(`[SQLInjectionGuard] ${message}`);
|
|
90
|
-
} else {
|
|
91
|
-
const err = new Error('Potential SQL injection');
|
|
92
|
-
err.code = 'SQLInjection';
|
|
93
|
-
err.data = message;
|
|
94
|
-
throw err;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
validateParamList(params) {
|
|
101
|
-
this. _initialize()
|
|
102
|
-
this.paramsSchema.parse(params); // Validate structure with Zod
|
|
103
|
-
for (const param of params) {
|
|
104
|
-
this.validateParamValue(param.name, param.value);
|
|
105
|
-
}
|
|
106
|
-
return params;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
validateRawSql(sql) {
|
|
110
|
-
this. _initialize()
|
|
111
|
-
if (typeof sql !== 'string') return false;
|
|
112
|
-
for (const pattern of this.dangerousSqlPatterns) {
|
|
113
|
-
if (pattern.test(sql.toLowerCase())) {
|
|
114
|
-
const message = `Potential SQL injection in "${sql}" pattern:${pattern}`;
|
|
115
|
-
if (this.onlyLog) {
|
|
116
|
-
this.logger.warn(`[SQLInjectionGuard] ${message}`);
|
|
117
|
-
} else {
|
|
118
|
-
const err = new Error('Potential SQL injection');
|
|
119
|
-
err.code = 'SQLInjection';
|
|
120
|
-
err.data = message;
|
|
121
|
-
throw err;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
return sql
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
validateObject(obj) {
|
|
129
|
-
this. _initialize()
|
|
130
|
-
const checkValue = (value) => {
|
|
131
|
-
if (typeof value === 'string') {
|
|
132
|
-
const trimmed = value.trim();
|
|
133
|
-
if (!this.isAllowedByWhitelist(trimmed)) {
|
|
134
|
-
for (const pattern of this.dangerousParamPatterns) {
|
|
135
|
-
if (pattern.test(trimmed)) {
|
|
136
|
-
const message = `Value "${value}" violates SQL injection policy.`;
|
|
137
|
-
if (this.onlyLog) {
|
|
138
|
-
this.logger.warn(`[SQLInjectionGuard] ${message}`);
|
|
139
|
-
} else {
|
|
140
|
-
const err = new Error('Potential SQL injection');
|
|
141
|
-
err.code = 'BadRequest';
|
|
142
|
-
err.data = message;
|
|
143
|
-
throw err;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
} else if (Array.isArray(value)) {
|
|
149
|
-
for (const item of value) checkValue(item);
|
|
150
|
-
} else if (typeof value === 'object' && value !== null) {
|
|
151
|
-
for (const key in value) {
|
|
152
|
-
if (Object.hasOwn(value, key)) {
|
|
153
|
-
checkValue(value[key]);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
checkValue(obj);
|
|
160
|
-
return obj;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
File without changes
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<body onload="javascript:startChecking()">
|
|
4
|
-
<iframe id="iframeOP" title="Session Iframe" src="{{sessionIframeUrl}}" style="display: none"></iframe>
|
|
5
|
-
</body>
|
|
6
|
-
<script>
|
|
7
|
-
let targetRP = new URL('{{sessionIframeUrl}}');
|
|
8
|
-
let previousState = '';
|
|
9
|
-
|
|
10
|
-
function startChecking() {
|
|
11
|
-
previousState = getCookieValue('{{sessionCookiesPrefix}}session_state');
|
|
12
|
-
setInterval(checkStatus, 15e3);
|
|
13
|
-
setInterval(checkSessionStatus, 15e3);
|
|
14
|
-
}
|
|
15
|
-
async function checkSessionStatus() {
|
|
16
|
-
try {
|
|
17
|
-
const response = await fetch('/check-session', {
|
|
18
|
-
method: 'GET',
|
|
19
|
-
credentials: 'include' // Include cookies in the request
|
|
20
|
-
});
|
|
21
|
-
const data = await response.json();
|
|
22
|
-
if (data.expired) {
|
|
23
|
-
if (data.redirectUrl) {
|
|
24
|
-
parent.location.href = data.redirectUrl; // redirect sentence
|
|
25
|
-
} else {
|
|
26
|
-
parent.location.reload(); // Reload the parent page instead of just the iframe
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
} catch (error) {
|
|
30
|
-
console.error('Error validating token:', error);
|
|
31
|
-
// Optionally handle the error
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
function getCookieValue(cookieName) {
|
|
35
|
-
let name = cookieName + '=';
|
|
36
|
-
let cookies = document.cookie.split(';');
|
|
37
|
-
if (!cookies) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
for (let i = 0; i < cookies.length; i++) {
|
|
41
|
-
let cookie = cookies[i].trim();
|
|
42
|
-
if (cookie.indexOf(name) == 0) {
|
|
43
|
-
return cookie.substring(name.length, cookie.length);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function checkStatus() {
|
|
50
|
-
let client = '{{clientId}}';
|
|
51
|
-
const prefix = '{{sessionCookiesPrefix}}'
|
|
52
|
-
let sessionState = getCookieValue(prefix + 'session_state');
|
|
53
|
-
let message = client + ' ' + sessionState;
|
|
54
|
-
const iframe = document.getElementById('iframeOP');
|
|
55
|
-
iframe.contentWindow.postMessage(message, '{{sessionIframeUrl}}');
|
|
56
|
-
//window.frames['iframeOP'].contentWindow.postMessage(message, '{{sessionIframeUrl}}');
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
window.addEventListener('message', receiveMessage, false);
|
|
60
|
-
|
|
61
|
-
function receiveMessage(event) {
|
|
62
|
-
if (event.origin !== targetRP.origin) return;
|
|
63
|
-
// To avoid endless reloads, only do a reload when the session state changed
|
|
64
|
-
let currentState = getCookieValue('{{sessionCookiesPrefix}}session_state');
|
|
65
|
-
|
|
66
|
-
if (event.data === 'changed' && previousState !== currentState) {
|
|
67
|
-
previousState = currentState;
|
|
68
|
-
document.cookie = 'session_state' + '=; Max-Age=0; SameSite=None; Secure';
|
|
69
|
-
parent.location.reload();
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
</script>
|
|
73
|
-
</html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/blz-security/xssGuard.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
const { JSDOM } = require('jsdom');
|
|
2
|
-
const createDOMPurify = require('dompurify');
|
|
3
|
-
|
|
4
|
-
module.exports = class XssGuard {
|
|
5
|
-
constructor(logger = console) {
|
|
6
|
-
this.logger = logger;
|
|
7
|
-
const window = new JSDOM('').window;
|
|
8
|
-
this.DOMPurify = createDOMPurify(window);
|
|
9
|
-
this.sanitizeOptions = {
|
|
10
|
-
ALLOWED_TAGS: [], // Does not allow any HTML tags
|
|
11
|
-
ALLOWED_ATTR: [] // No attributes
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
isZipString(str) {
|
|
16
|
-
return str.startsWith('PK\x03\x04');
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
isAllowedBlocklyXml(str) {
|
|
20
|
-
const blocklyPatterns = [
|
|
21
|
-
/^<xml[\s\S]*<\/xml>$/i,
|
|
22
|
-
/^<block[\s\S]*<\/block>$/i,
|
|
23
|
-
/^<field name="[\w\-:]+">[\s\S]*<\/field>$/i,
|
|
24
|
-
/^<value name="[\w\-:]+">[\s\S]*<\/value>$/i
|
|
25
|
-
];
|
|
26
|
-
return blocklyPatterns.some((re) => re.test(str));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
sanitizeObject(obj) {
|
|
30
|
-
const sanitizeValue = (value, path = '') => {
|
|
31
|
-
if (value === null)
|
|
32
|
-
return null;
|
|
33
|
-
if (value === undefined )
|
|
34
|
-
return undefined
|
|
35
|
-
|
|
36
|
-
const valueType = toString.call(value);
|
|
37
|
-
if (valueType === '[object String]') {
|
|
38
|
-
|
|
39
|
-
if(this.isZipString(value)){
|
|
40
|
-
return value
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
let decoded;
|
|
44
|
-
try {
|
|
45
|
-
decoded = decodeURIComponent(value);
|
|
46
|
-
} catch {
|
|
47
|
-
decoded = value;
|
|
48
|
-
}
|
|
49
|
-
const trimmed = decoded.trim();
|
|
50
|
-
// ⚠️ Skip DOMPurify for valid Blockly XML
|
|
51
|
-
if (this.isAllowedBlocklyXml(trimmed)) {
|
|
52
|
-
return trimmed;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const cleaned = this.DOMPurify.sanitize(trimmed, this.sanitizeOptions);
|
|
57
|
-
|
|
58
|
-
if (cleaned !== trimmed) {
|
|
59
|
-
const message = `Sanitized input at path "${path}". Original: "${trimmed}", Cleaned: "${cleaned}".`;
|
|
60
|
-
this.logger.warn(message);
|
|
61
|
-
}
|
|
62
|
-
return cleaned;
|
|
63
|
-
} else if (valueType === '[object Number]') {
|
|
64
|
-
return value
|
|
65
|
-
} else if (valueType === '[object Boolean]') {
|
|
66
|
-
return value
|
|
67
|
-
} else if (valueType === '[object Date]') {
|
|
68
|
-
return value
|
|
69
|
-
} else if (valueType === '[object Object]' && value.type === 'Buffer' && value.data) {
|
|
70
|
-
return value
|
|
71
|
-
} else if (Array.isArray(value)) {
|
|
72
|
-
return value.map((item, index) => sanitizeValue(item, `${path}[${index}]`));
|
|
73
|
-
} else if (typeof value === 'object' && value !== null) {
|
|
74
|
-
const sanitizedObj = {};
|
|
75
|
-
for (const key in value) {
|
|
76
|
-
if (Object.hasOwn(value, key)) {
|
|
77
|
-
const childPath = path ? `${path}.${key}` : key;
|
|
78
|
-
sanitizedObj[key] = sanitizeValue(value[key], childPath);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return sanitizedObj;
|
|
82
|
-
}
|
|
83
|
-
return value;
|
|
84
|
-
};
|
|
85
|
-
return sanitizeValue(obj);
|
|
86
|
-
}
|
|
87
|
-
};
|
package/blz-strings/index.js
DELETED
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
_internal_: {
|
|
3
|
-
htmlUnescapes: {
|
|
4
|
-
'&': '&',
|
|
5
|
-
'<': '<',
|
|
6
|
-
'>': '>',
|
|
7
|
-
'"': '"',
|
|
8
|
-
''': "'"
|
|
9
|
-
},
|
|
10
|
-
reEscapedHtml: /&(?:amp|lt|gt|quot|#(0+)?39);/g,
|
|
11
|
-
reHasEscapedHtml: RegExp('&(?:amp|lt|gt|quot|#(0+)?39);'),
|
|
12
|
-
htmlEscapes: {
|
|
13
|
-
'&': '&',
|
|
14
|
-
'<': '<',
|
|
15
|
-
'>': '>',
|
|
16
|
-
'"': '"',
|
|
17
|
-
"'": '''
|
|
18
|
-
},
|
|
19
|
-
reUnescapedHtml: /[&<>"']/g,
|
|
20
|
-
reHasUnescapedHtml: RegExp(`[&<>"']`),
|
|
21
|
-
},
|
|
22
|
-
concat: function () {
|
|
23
|
-
let result = '';
|
|
24
|
-
for (let i = 0; i < arguments.length; i++) {
|
|
25
|
-
let argument = arguments[i];
|
|
26
|
-
if (argument !== null)
|
|
27
|
-
result += argument;
|
|
28
|
-
}
|
|
29
|
-
return result;
|
|
30
|
-
},
|
|
31
|
-
contains: function (target, value) {
|
|
32
|
-
if (target === null || target === undefined)
|
|
33
|
-
return false;
|
|
34
|
-
if (value === null || value === undefined)
|
|
35
|
-
return false;
|
|
36
|
-
return target.indexOf(value) !== -1;
|
|
37
|
-
},
|
|
38
|
-
endsWith: function (target, value) {
|
|
39
|
-
if (target === null || target === undefined)
|
|
40
|
-
return false;
|
|
41
|
-
if (value === null || value === undefined)
|
|
42
|
-
return false;
|
|
43
|
-
return target.substring(target.length - value.length, target.length) === value;
|
|
44
|
-
},
|
|
45
|
-
escapeHtml: function (value) {
|
|
46
|
-
return (value && this._internal_.reHasUnescapedHtml.test(value))
|
|
47
|
-
? value.replace(this._internal_.reUnescapedHtml, (chr) => this._internal_.htmlEscapes[chr])
|
|
48
|
-
: (value || '')
|
|
49
|
-
},
|
|
50
|
-
indexOf: function (target, value) {
|
|
51
|
-
if (target === null || target === undefined)
|
|
52
|
-
return -1;
|
|
53
|
-
if (value === null || value === undefined)
|
|
54
|
-
return -1;
|
|
55
|
-
return target.indexOf(value);
|
|
56
|
-
},
|
|
57
|
-
isNullOrEmpty: function (target) {
|
|
58
|
-
if (target === null || target === undefined)
|
|
59
|
-
return true;
|
|
60
|
-
return (target === '');
|
|
61
|
-
},
|
|
62
|
-
isNullOrWhiteSpace: function (target) {
|
|
63
|
-
if (target === null || target === undefined)
|
|
64
|
-
return true;
|
|
65
|
-
return (target === '' || target.replace(/\s/g, '').length < 1);
|
|
66
|
-
},
|
|
67
|
-
join: function (target, delimiter) {
|
|
68
|
-
if (target === null || target === undefined)
|
|
69
|
-
return null;
|
|
70
|
-
if (delimiter)
|
|
71
|
-
return target.join(delimiter);
|
|
72
|
-
else
|
|
73
|
-
return target.join('');
|
|
74
|
-
},
|
|
75
|
-
lastIndexOf: function (target, value) {
|
|
76
|
-
if (target === null || target === undefined)
|
|
77
|
-
return -1;
|
|
78
|
-
if (value === null || value === undefined)
|
|
79
|
-
return -1;
|
|
80
|
-
return target.lastIndexOf(value);
|
|
81
|
-
},
|
|
82
|
-
length: function (target) {
|
|
83
|
-
if (target === null || target === undefined)
|
|
84
|
-
return 0;
|
|
85
|
-
return target.length;
|
|
86
|
-
},
|
|
87
|
-
padLeft: function (target, totalWidth, padding) {
|
|
88
|
-
if (target === null || target === undefined)
|
|
89
|
-
return null;
|
|
90
|
-
if (totalWidth === null || totalWidth === undefined)
|
|
91
|
-
return target;
|
|
92
|
-
if (padding)
|
|
93
|
-
return target.padStart(totalWidth, padding);
|
|
94
|
-
else
|
|
95
|
-
return target.padStart(totalWidth);
|
|
96
|
-
},
|
|
97
|
-
padRight: function (target, totalWidth, padding) {
|
|
98
|
-
if (target === null || target === undefined)
|
|
99
|
-
return null;
|
|
100
|
-
if (totalWidth === null || totalWidth === undefined)
|
|
101
|
-
return target;
|
|
102
|
-
if (padding)
|
|
103
|
-
return target.padEnd(totalWidth, padding);
|
|
104
|
-
else
|
|
105
|
-
return target.padEnd(totalWidth);
|
|
106
|
-
},
|
|
107
|
-
replace: function (target, oldValue, newValue) {
|
|
108
|
-
if (target === null || target === undefined)
|
|
109
|
-
return null;
|
|
110
|
-
if (oldValue === null || oldValue === undefined)
|
|
111
|
-
return target;
|
|
112
|
-
if (newValue === null || newValue === undefined)
|
|
113
|
-
return target;
|
|
114
|
-
return target.replace(new RegExp(oldValue, 'g'), newValue);
|
|
115
|
-
},
|
|
116
|
-
split: function (target, delimiter) {
|
|
117
|
-
if (target === null || target === undefined)
|
|
118
|
-
return [];
|
|
119
|
-
return target.split(delimiter);
|
|
120
|
-
},
|
|
121
|
-
startsWith: function (target, value) {
|
|
122
|
-
if (target === null || target === undefined)
|
|
123
|
-
return false;
|
|
124
|
-
if (value === null || value === undefined)
|
|
125
|
-
return false;
|
|
126
|
-
return target.substring(0, value.length) === value;
|
|
127
|
-
},
|
|
128
|
-
substring: function (target, startIndex, length) {
|
|
129
|
-
if (target === null || target === undefined)
|
|
130
|
-
return null;
|
|
131
|
-
if (startIndex === null || startIndex === undefined)
|
|
132
|
-
return null;
|
|
133
|
-
if (length === null || length === undefined)
|
|
134
|
-
return null;
|
|
135
|
-
return target.substring(startIndex, startIndex + length);
|
|
136
|
-
},
|
|
137
|
-
toLower: function (target) {
|
|
138
|
-
if (target === null || target === undefined)
|
|
139
|
-
return null;
|
|
140
|
-
return target.toLowerCase();
|
|
141
|
-
},
|
|
142
|
-
toUpper: function (target) {
|
|
143
|
-
if (target === null || target === undefined)
|
|
144
|
-
return null;
|
|
145
|
-
return target.toUpperCase();
|
|
146
|
-
},
|
|
147
|
-
trim: function (target) {
|
|
148
|
-
if (target === null || target === undefined)
|
|
149
|
-
return null;
|
|
150
|
-
return target.trim();
|
|
151
|
-
},
|
|
152
|
-
trimEnd: function (target) {
|
|
153
|
-
if (target === null || target === undefined)
|
|
154
|
-
return null;
|
|
155
|
-
return target.trimEnd();
|
|
156
|
-
},
|
|
157
|
-
trimStart: function (target) {
|
|
158
|
-
if (target === null || target === undefined)
|
|
159
|
-
return null;
|
|
160
|
-
return target.trimStart();
|
|
161
|
-
},
|
|
162
|
-
unescapeHtml: function (value) {
|
|
163
|
-
return (value && this._internal_.reHasEscapedHtml.test(value))
|
|
164
|
-
? value.replace(this._internal_.reEscapedHtml, (entity) => (this._internal_.htmlUnescapes[entity] || "'"))
|
|
165
|
-
: (value || '')
|
|
166
|
-
},
|
|
167
|
-
};
|
package/blz-uuid/index.js
DELETED
package/blz-yaml/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const jsyaml = require('js-yaml')
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
yamlParse: function (value) {
|
|
5
|
-
if (value === undefined)
|
|
6
|
-
throw new Error('value undefined')
|
|
7
|
-
if (value === null)
|
|
8
|
-
return null
|
|
9
|
-
return jsyaml.load(value)
|
|
10
|
-
},
|
|
11
|
-
yamlStringify: function (value) {
|
|
12
|
-
if (value === undefined)
|
|
13
|
-
throw new Error('value undefined')
|
|
14
|
-
if (value === null)
|
|
15
|
-
return null
|
|
16
|
-
else
|
|
17
|
-
return jsyaml.dump(value)
|
|
18
|
-
},
|
|
19
|
-
};
|
package/index.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
const BlzBase = require('./blz-base');
|
|
2
|
-
const BlzConfig = require('./blz-config');
|
|
3
|
-
const BlzSecurity = require('./blz-security');
|
|
4
|
-
const FileScanner = require('./blz-security/filescanner/index.js');
|
|
5
|
-
const ProcessManagers = require('./process-managers');
|
|
6
|
-
const { Exception } = require('./blz-security/helpers/utils');
|
|
7
|
-
const BlzCache = require('./blz-cache');
|
|
8
|
-
const BlzCore = require('./blz-core');
|
|
9
|
-
const BlzCryptography = require('./blz-cryptography');
|
|
10
|
-
const BlzDatetimes = require('./blz-datetimes');
|
|
11
|
-
const BlzFile = require('./blz-file');
|
|
12
|
-
const BlzHazelcast = require('./blz-hazelcast');
|
|
13
|
-
const BlzIterable = require('./blz-iterable');
|
|
14
|
-
const BlzJsonSchema = require('./blz-json-schema');
|
|
15
|
-
const BlzJwt = require('./blz-jwt');
|
|
16
|
-
const BlzKafka = require('./blz-kafka');
|
|
17
|
-
const BlzMath = require('./blz-math');
|
|
18
|
-
const BlzMongodb = require('./blz-mongodb');
|
|
19
|
-
// const BlzProcesses = require('./blz-processes');
|
|
20
|
-
const BlzRds = require('./blz-rds');
|
|
21
|
-
const BlzRdsMysql = require('./blz-rds-mysql');
|
|
22
|
-
const BlzRdsMysqlx = require('./blz-rds-mysqlx');
|
|
23
|
-
const BlzRdsOracle = require('./blz-rds-oracle');
|
|
24
|
-
const BlzRdsPostgres = require('./blz-rds-postgres');
|
|
25
|
-
const BlzRedis = require('./blz-redis');
|
|
26
|
-
const BlzRegex = require('./blz-regex');
|
|
27
|
-
const BlzStrings = require('./blz-strings/index.js');
|
|
28
|
-
const BlzUuid = require('./blz-uuid');
|
|
29
|
-
const BlzYaml = require('./blz-yaml');
|
|
30
|
-
const { getHealthStatus } = require('./blz-base/health/index.js');
|
|
31
|
-
|
|
32
|
-
const rdsProvider = function(providerName){
|
|
33
|
-
return require('./blz-rds-' + providerName.toLowerCase() + '/index.js')
|
|
34
|
-
}
|
|
35
|
-
const getModulesNames = () => {
|
|
36
|
-
return [
|
|
37
|
-
'blz-base', 'blz-cache', 'blz-config', 'blz-core',
|
|
38
|
-
'blz-cryptography', 'blz-datetimes', 'blz-file',
|
|
39
|
-
'blz-hazelcast', 'blz-iterable', 'blz-json-schema',
|
|
40
|
-
'blz-jwt', 'blz-kafka', 'blz-math', 'blz-mongodb',
|
|
41
|
-
'blz-rds', 'blz-rds-mysql', 'blz-rds-mysqlx', 'blz-rds-oracle',
|
|
42
|
-
'blz-rds-postgres', 'blz-redis', 'blz-regex', 'blz-security',
|
|
43
|
-
'blz-strings', 'blz-uuid', 'blz-yaml'
|
|
44
|
-
];
|
|
45
|
-
}
|
|
46
|
-
const getVersion = () => {
|
|
47
|
-
const pkg = require('./package.json');
|
|
48
|
-
return pkg.version || 'unknown';
|
|
49
|
-
}
|
|
50
|
-
module.exports = {
|
|
51
|
-
BlzBase,
|
|
52
|
-
BlzConfig,
|
|
53
|
-
BlzSecurity,
|
|
54
|
-
ProcessManagers,
|
|
55
|
-
Exception,
|
|
56
|
-
BlzCache,
|
|
57
|
-
BlzCore,
|
|
58
|
-
BlzCryptography,
|
|
59
|
-
BlzDatetimes,
|
|
60
|
-
BlzFile,
|
|
61
|
-
BlzHazelcast,
|
|
62
|
-
BlzIterable,
|
|
63
|
-
BlzJsonSchema,
|
|
64
|
-
BlzJwt,
|
|
65
|
-
BlzKafka,
|
|
66
|
-
BlzMath,
|
|
67
|
-
BlzMongodb,
|
|
68
|
-
// BlzProcesses,
|
|
69
|
-
BlzRds,
|
|
70
|
-
BlzRdsMysql,
|
|
71
|
-
BlzRdsMysqlx,
|
|
72
|
-
BlzRdsOracle,
|
|
73
|
-
BlzRdsPostgres,
|
|
74
|
-
BlzRedis,
|
|
75
|
-
BlzRegex,
|
|
76
|
-
BlzStrings,
|
|
77
|
-
BlzUuid,
|
|
78
|
-
BlzYaml,
|
|
79
|
-
getHealthStatus,
|
|
80
|
-
FileScanner,
|
|
81
|
-
rdsProvider,
|
|
82
|
-
getModulesNames,
|
|
83
|
-
getVersion
|
|
84
|
-
};
|