Update dependency class-validator to ^0.14.0 [SECURITY] #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.9.1->^0.14.0GitHub Vulnerability Alerts
CVE-2019-18413
In TypeStack class-validator,
validate()input validation can be bypassed because certain internal attributes can be overwritten via a conflicting name. Even though there is an optionalforbidUnknownValuesparameter that can be used to reduce the risk of this bypass, this option is not documented and thus most developers configure input validation in the vulnerable default manner. With this vulnerability, attackers can launch SQL Injection or XSS attacks by injecting arbitrary malicious input.The default settings for
forbidUnknownValueshas been changed totruein 0.14.0.NOTE: a software maintainer agrees with the "is not documented" finding but suggests that much of the responsibility for the risk lies in a different product.
Release Notes
typestack/class-validator (class-validator)
v0.14.0Compare Source
Fixed
forbidUnknownValuesdid not default totruewhenvalidatorOptionswas undefined. (#2196 by @cduff)ValidationMetadata.nameproperty to work correctly with the@IsOptionaldecorator. (#2044 by @Clashsoft)@IsBase64decorator. (#2549 by @aseyfpour)isBase64function. (#2574 by @braaar)0.14.1 (2024-01-12)
Added
@IsBase64decorator (#1845) , closes #1013@IsUUIDdecorator (#1846) , closes #1497@IsPhoneNumberdecorator to use max dataset (#1857)Fixed
@IsIndecorator (#1844) , closes #1693@IsNotEmptyObjectdecorator correctly (#1555) , closes #1554Changed
libphonenumber-jsto^1.10.53from^1.10.140.14.0 (2022-12-09)
Added
@IsTimeZonedecorator to check if given string is valid IANA time zone@IsISO4217CurrencyCodedecorator to check if the string is an ISO 4217 currency code@IsStrongPassworddecorator to check if given password matches specific complexity criteria@IsBase58decorator to check if a string is base58 encoded@IsTaxIddecorator to check if a given string is a valid tax ID in a given locale@MinDateand@MaxDatedecorators@IsEnumdecoratorFixed
@types/validatoras dependency@NestedValidation@IsDateStringdecoratorSymbolas parameter in error message generation@IsAlphanumericdecoratorChanged
forbidUnknownValuesoption by defaultlibphonenumber-jsto^1.10.14from^1.9.43BREAKING CHANGES
forbidUnknownValuesoption is enabled by defaultFrom this release the
forbidUnknownValuesis enabled by default. This is the desired behavior for majority ofuse-cases, but this change may break validation for some. The two scenarios that results in failed validation:
The old behavior can be restored via specifying
forbidUnknownValues: falseoption when calling the validate functions.For more details see PR #1798 and #1422 (comment).
@NestedValidationdecorator correctly assigns validation errorsUntil now the errors from a nested validation in some cases were incorrectly assigned
to the parent instead of the child being validated. Now the validation errors are correctly assigned.
For more details see #679.
0.13.2 (2021-11-20)
Fixed
Array.isArrayin array checks frominstanceofoperatorChanged
libphonenumber-jspackage updated to1.9.43from1.9.7validatorpackage updated to13.5.2from13.5.20.13.1 (2021-01-14)
Added
ArrayUniquedecoratorFixed
IsUUIDdecoratorValidationError.toString()doesn't result in an error whenforbidNonWhitelistedparameter was usedIsIndecorator@types/validatorpackage is correctly installedinlineSourcesoption is enabled in tsconfig preventing various sourcemap errors when consuming the packageChanged
0.13.0 (2021-01-11)
Added
always- allows setting global default foralwaysoption for decoratorsstrictGroups- ignore decorators with at least one group, whenValidatorOptions.groupsis emptyFixed
isPostalCodedecorator (#634)IsDateString()decorator now aliases theIsISO8601()decorator (#672)Changed
0.12.2 (2020-04-23)
Fixed
tslibfrompeerDependenciestodependencies(827eff1), closes #5880.12.1 (2020-04-18)
Fixed
0.12.0 (2020-04-18)
Fixed
constraintsproperty in ValidationError (#465) (84680ad), closes #309Changed
Added
BREAKING CHANGES
Validatorjs releases contain some breaking changes e.g.
IsMobileNumberorIsHexColor. Please check validatorjs CHANGELOGValidation functions was removed from
Validatorclass to enable tree shaking.BEFORE:
AFTER:
IsNumberString decorator arguments changed to
@IsNumberString(ValidatorJS.IsNumericOptions, ValidationOptions).0.11.1 (2020-03-18)
Fixed
Added
0.11.0 (2019-11-01)
Fixed
Added
BREAKING CHANGES
0.10.2 (2019-10-14)
Fixed
Added
0.10.1 (2019-09-25)
Fixed
Added
skipUndefinedProperties,skipNullPropertiesoptions (#414) (76c948a), closes #3080.10.0 (2019-08-10)
Fixed
Added
IsISO31661Alpha3andIsISO31661Alpha2validators (#273) (55c57b3)IsDecimalfrom validatorjs (#359) (b4c8e21)isPortdecorator (#282) (36684ec)ValidatePromisedecorator - resolve promise before validate (#369) (35ec04d)isNumberStringnow accept validator.jsIsNumericOptionsas second parameter (#262)BREAKING CHANGES
isDateStringnow check to match only entire ISO Date (#275) (5012464)IsCurrencyOptions,IsURLOptions,IsEmailOptions,IsFQDNOptionsinterfaces and replace with interfaces from@types/validator0.9.1
Added
Fixed
0.9.0 [BREAKING CHANGE]
Added
IsNumberStringdecorator, now they are allowed+symbol, this is not allowed anymoreIsPhoneNumberdecorator has been added which uses the google-libphonenumber library to validate international phone numbers accuratelyFixed
IsURLOptionsto match underlying validator host list optionsMinandMaxdecorator will corectly show an inclusive error message when failingvalidationArguments.valueis not a string0.8.5
Fixed
ansicolorpackage, because it's incompatible with IE0.8.4
Added
ValidatorOptionsnow has aforbidUnknownValueskey to prevent unknown objects to pass validationfalsebut will be default totrueafter the 1.0 release0.8.3
Fixed
targetproperty is undefined when callingValidationError.toString()0.8.2
Added
ValidationError.toString()method for easier debuggingprintErrormethod to pretty-print errors in NodeJS or the browserFixed
ValidatorOptionsValidationSchema(theoptionskey now is optional)IsNumericStringtoIsNumberStringin the READMEhost_whitelistandhost_backlistinIsURLOptions0.8.1
Fixed
ValidatorOptions0.8.0 [BREAKING CHANGE]
Added
updated validator.js from 7.0.0 to 9.2.0 (Check it's changelog for what has changed.)
This caused breaking change, if you used the
IsUrldecorator to validatelocalhostas a valid url, from now you must use therequire_tld: falseoptionadded
@IsInstancedecorator andvalidator.isInstance(value, target)method.changed
@IsNumberdecorator has been changed to@IsNumber(options: IsNumberOptions)added option to strip unknown properties (
whitelist: true)added option to throw error on unknown properties (
forbidNonWhitelisted: true)added
@Allowdecorator to prevent stripping properties without other constraintFixed
@IsDateStringnow it allow dates without fraction seconds to be set@IsDateStringnow it allow dates without with timezones to be set@ValidateNestedcorrectly generates validation error on non object and non array values0.6.7
Fixed
@ValidateNestedwhen nested property is not defined and it throw an error (#59)0.6.5
Fixed
@IsUrl,@IsEmailand several other decorators0.6.4
Added
@IsMilitaryTimedecorator.0.6.3
Added
validateOrRejectmethod which rejects promise instead of returning array of errors in resolved result0.6.1
Added
@IsArraydecorator.0.6.0 [BREAKING CHANGE]
Added
@ValidateNestedon arrays: Validator now groups the validation errors by sub-object, rather than them all being grouped together. See #32 for a demonstration of the updated structure.@ValidateIfdecorator, see conditional validation in docs.0.5.0 [BREAKING CHANGE]
Added
async validations must be marked with
{ async: true }option now.This is optional, but it helps to determine which decorators are async to prevent their execution in
validateSyncmethod.added
validateSyncmethod that performs non asynchronous validation and ignores validations that marked withasync: true.there is a breaking change in
registerDecoratormethod. Now it accepts options object.breaking change with
@ValidatorConstraintdecorator. Now it accepts option object instead of single name.0.4.1
Fixed
0.4.0 [BREAKING CHANGE]
Added
ValidatorInterfacehas been renamed toValidatorConstraintInterfacevalidator.validateValidationError. Now if it has nested errors it does not return them in a flat arrayFixed
0.3.0
Added
validator.tstoclass-validator.v0.13.2Compare Source
Fixed
forbidUnknownValuesdid not default totruewhenvalidatorOptionswas undefined. (#2196 by @cduff)ValidationMetadata.nameproperty to work correctly with the@IsOptionaldecorator. (#2044 by @Clashsoft)@IsBase64decorator. (#2549 by @aseyfpour)isBase64function. (#2574 by @braaar)0.14.1 (2024-01-12)
Added
@IsBase64decorator (#1845) , closes #1013@IsUUIDdecorator (#1846) , closes #1497@IsPhoneNumberdecorator to use max dataset (#1857)Fixed
@IsIndecorator (#1844) , closes #1693@IsNotEmptyObjectdecorator correctly (#1555) , closes #1554Changed
libphonenumber-jsto^1.10.53from^1.10.140.14.0 (2022-12-09)
Added
@IsTimeZonedecorator to check if given string is valid IANA time zone@IsISO4217CurrencyCodedecorator to check if the string is an ISO 4217 currency code@IsStrongPassworddecorator to check if given password matches specific complexity criteria@IsBase58decorator to check if a string is base58 encoded@IsTaxIddecorator to check if a given string is a valid tax ID in a given locale@MinDateand@MaxDatedecorators@IsEnumdecoratorFixed
@types/validatoras dependency@NestedValidation@IsDateStringdecoratorSymbolas parameter in error message generation@IsAlphanumericdecoratorChanged
forbidUnknownValuesoption by defaultlibphonenumber-jsto^1.10.14from^1.9.43BREAKING CHANGES
forbidUnknownValuesoption is enabled by defaultFrom this release the
forbidUnknownValuesis enabled by default. This is the desired behavior for majority ofuse-cases, but this change may break validation for some. The two scenarios that results in failed validation:
The old behavior can be restored via specifying
forbidUnknownValues: falseoption when calling the validate functions.For more details see PR #1798 and #1422 (comment).
@NestedValidationdecorator correctly assigns validation errorsUntil now the errors from a nested validation in some cases were incorrectly assigned
to the parent instead of the child being validated. Now the validation errors are correctly assigned.
For more details see #679.
0.13.2 (2021-11-20)
Fixed
Array.isArrayin array checks frominstanceofoperatorChanged
libphonenumber-jspackage updated to1.9.43from1.9.7validatorpackage updated to13.5.2from13.5.20.13.1 (2021-01-14)
Added
ArrayUniquedecoratorFixed
IsUUIDdecoratorValidationError.toString()doesn't result in an error whenforbidNonWhitelistedparameter was usedIsIndecorator@types/validatorpackage is correctly installedinlineSourcesoption is enabled in tsconfig preventing various sourcemap errors when consuming the packageChanged
0.13.0 (2021-01-11)
Added
always- allows setting global default foralwaysoption for decoratorsstrictGroups- ignore decorators with at least one group, whenValidatorOptions.groupsis emptyFixed
isPostalCodedecorator (#634)IsDateString()decorator now aliases theIsISO8601()decorator (#672)Changed
0.12.2 (2020-04-23)
Fixed
tslibfrompeerDependenciestodependencies(827eff1), closes #5880.12.1 (2020-04-18)
Fixed
0.12.0 (2020-04-18)
Fixed
constraintsproperty in ValidationError (#465) (84680ad), closes #309Changed
Added
BREAKING CHANGES
Validatorjs releases contain some breaking changes e.g.
IsMobileNumberorIsHexColor. Please check validatorjs CHANGELOGValidation functions was removed from
Validatorclass to enable tree shaking.BEFORE:
AFTER:
IsNumberString decorator arguments changed to
@IsNumberString(ValidatorJS.IsNumericOptions, ValidationOptions).0.11.1 (2020-03-18)
Fixed
Added
0.11.0 (2019-11-01)
Fixed
Added
BREAKING CHANGES
0.10.2 (2019-10-14)
Fixed
Added
0.10.1 (2019-09-25)
Fixed
Added
skipUndefinedProperties,skipNullPropertiesoptions (#414) (76c948a), closes #3080.10.0 (2019-08-10)
Fixed
Added
IsISO31661Alpha3andIsISO31661Alpha2validators (#273) (55c57b3)IsDecimalfrom validatorjs (#359) (b4c8e21)isPortdecorator (#282) (36684ec)ValidatePromisedecorator - resolve promise before validate (#369) (35ec04d)isNumberStringnow accept validator.jsIsNumericOptionsas second parameter (#262)BREAKING CHANGES
isDateStringnow check to match only entire ISO Date (#275) (5012464)IsCurrencyOptions,IsURLOptions,IsEmailOptions,IsFQDNOptionsinterfaces and replace with interfaces from@types/validator0.9.1
Added
Fixed
0.9.0 [BREAKING CHANGE]
Added
IsNumberStringdecorator, now they are allowed+symbol, this is not allowed anymoreIsPhoneNumberdecorator has been added which uses the google-libphonenumber library to validate international phone numbers accuratelyFixed
IsURLOptionsto match underlying validator host list optionsMinandMaxdecorator will corectly show an inclusive error message when failingvalidationArguments.valueis not a string0.8.5
Fixed
ansicolorpackage, because it's incompatible with IE0.8.4
Added
ValidatorOptionsnow has aforbidUnknownValueskey to prevent unknown objects to pass validationfalsebut will be default totrueafter the 1.0 release0.8.3
Fixed
targetproperty is undefined when callingValidationError.toString()0.8.2
Added
ValidationError.toString()method for easier debuggingprintErrormethod to pretty-print errors in NodeJS or the browserFixed
ValidatorOptionsValidationSchema(theoptionskey now is optional)IsNumericStringtoIsNumberStringin the READMEhost_whitelistandhost_backlistinIsURLOptions0.8.1
Fixed
ValidatorOptions0.8.0 [BREAKING CHANGE]
Added
updated validator.js from 7.0.0 to 9.2.0 (Check it's changelog for what has changed.)
This caused breaking change, if you used the
IsUrldecorator to validatelocalhostas a valid url, from now you must use therequire_tld: falseoptionadded
@IsInstancedecorator andvalidator.isInstance(value, target)method.changed
@IsNumberdecorator has been changed to@IsNumber(options: IsNumberOptions)added option to strip unknown properties (
whitelist: true)added option to throw error on unknown properties (
forbidNonWhitelisted: true)added
@Allowdecorator to prevent stripping properties without other constraintFixed
@IsDateStringnow it allow dates without fraction seconds to be set@IsDateStringnow it allow dates without with timezones to be set@ValidateNestedcorrectly generates validation error on non object and non array values0.6.7
Fixed
@ValidateNestedwhen nested property is not defined and it throw an error (#59)0.6.5
Fixed
@IsUrl,@IsEmailand several other decorators0.6.4
Added
@IsMilitaryTimedecorator.0.6.3
Added
validateOrRejectmethod which rejects promise instead of returning array of errors in resolved result0.6.1
Added
@IsArraydecorator.0.6.0 [BREAKING CHANGE]
Added
@ValidateNestedon arrays: Validator now groups the validation errors by sub-object, rather than them all being grouped together. See #32 for a demonstration of the updated structure.@ValidateIfdecorator, see conditional validation in docs.0.5.0 [BREAKING CHANGE]
Added
async validations must be marked with
{ async: true }option now.This is optional, but it helps to determine which decorators are async to prevent their execution in
validateSyncmethod.added
validateSyncmethod that performs non asynchronous validation and ignores validations that marked withasync: true.there is a breaking change in
registerDecoratormethod. Now it accepts options object.breaking change with
@ValidatorConstraintdecorator. Now it accepts option object instead of single name.0.4.1
Fixed
0.4.0 [BREAKING CHANGE]
Added
ValidatorInterfacehas been renamed toValidatorConstraintInterfacevalidator.validateConfiguration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.