diff --git a/CHANGELOG.md b/CHANGELOG.md index cdb12f6..d9a1373 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -## [v1.0.9](https://github.com/konfer-be/cliam/compare/v1.0.8...v1.0.9) +## [v1.0.10](https://github.com/konfer-be/cliam/compare/v1.0.9...v1.0.10) + +### Commits + +- Set password max length to 24 [`4d56ca4`](https://github.com/konfer-be/cliam/commit/4d56ca427b192fd244757b9811c2e1feb030ddee) + +## [v1.0.9](https://github.com/konfer-be/cliam/compare/v1.0.8...v1.0.9) - 2021-04-18 ### Commits - Fix default colors [`44f5ce3`](https://github.com/konfer-be/cliam/commit/44f5ce397aa8f8909cdefbebd45eb7cd2539da5c) +- Update changelog [`5cd8d80`](https://github.com/konfer-be/cliam/commit/5cd8d80f4bb5b88aa27be6a4045d68cb327d8ec1) ## [v1.0.8](https://github.com/konfer-be/cliam/compare/v1.0.7...v1.0.8) - 2021-04-18 diff --git a/lib/types/schemas/password.schema.js b/lib/types/schemas/password.schema.js index 1d4cd40..708d5b9 100644 --- a/lib/types/schemas/password.schema.js +++ b/lib/types/schemas/password.schema.js @@ -6,11 +6,11 @@ const password = (type) => { const types = [ { type: 'user', - schema: Joi.string().min(8).max(16) + schema: Joi.string().min(8).max(24) }, { type: 'smtp', - schema: Joi.string().min(8).max(16) + schema: Joi.string().min(8).max(24) } ]; return types.filter(h => h.type === type).slice().shift().schema; diff --git a/package.json b/package.json index 0008b94..87874b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cliam", - "version": "1.0.9", + "version": "1.0.10", "engines": { "node": ">=14.16" }, diff --git a/src/types/schemas/password.schema.ts b/src/types/schemas/password.schema.ts index 545c724..8f2be41 100644 --- a/src/types/schemas/password.schema.ts +++ b/src/types/schemas/password.schema.ts @@ -5,11 +5,11 @@ const password = (type: string): AnySchema => { const types = [ { type: 'user', - schema: Joi.string().min(8).max(16) + schema: Joi.string().min(8).max(24) }, { type: 'smtp', - schema: Joi.string().min(8).max(16) + schema: Joi.string().min(8).max(24) } ]; return types.filter( h => h.type === type ).slice().shift().schema; diff --git a/test/units/01-client-configuration.unit.test.js b/test/units/01-client-configuration.unit.test.js index 64aaefb..1726133 100644 --- a/test/units/01-client-configuration.unit.test.js +++ b/test/units/01-client-configuration.unit.test.js @@ -407,10 +407,10 @@ describe('Client configuration', () => { done(); }); - it(`error - password should be less than or equals to 16 chars long`, (done) => { + it(`error - password should be less than or equals to 24 chars long`, (done) => { payload.mode.smtp.password = chance.string({ length: 32 }); const error = configurationSchema.validate(payload, { abortEarly: true, allowUnknown: false })?.error; - expect(error.details[0].message).to.be.eqls(`"mode.smtp.password" length must be less than or equal to 16 characters long`); + expect(error.details[0].message).to.be.eqls(`"mode.smtp.password" length must be less than or equal to 24 characters long`); done(); });