Skip to content
This repository has been archived by the owner on Oct 20, 2021. It is now read-only.

Commit

Permalink
Add Length Limit To Password Validation And Remove Package From GitHu…
Browse files Browse the repository at this point in the history
…b Registry (#23)
  • Loading branch information
henriqueleite42 committed Jan 22, 2021
1 parent 09da011 commit 028a449
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,6 @@ jobs:

- name: Publish to NPM
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm config set scope "@techmmunity"
npm config list
npm publish dist --access public
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

# Publish to GitHub Package Registry
- uses: actions/setup-node@master
with:
node-version: 14
registry-url: https://npm.pkg.github.com/
scope: "@techmmunity"

- name: Publish to GitHub Package Registry
run: npm publish dist
env:
NODE_AUTH_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@techmmunity/easy-check",
"version": "2.4.0",
"version": "2.4.1",
"main": "index.js",
"types": "index.d.ts",
"author": "Techmmunity",
Expand Down
2 changes: 1 addition & 1 deletion src/checks/password.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { makeFunction } from "checks/helpers";

const IS_STRONG_PASSWORD = /^.*(?=.{6,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9]).*$/;
const IS_STRONG_PASSWORD = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@#$!%*?&])[A-Za-z\d@$!%*#?&]{6,24}$/;
export const isStrongPassword = makeFunction({
regex: IS_STRONG_PASSWORD,
});

0 comments on commit 028a449

Please sign in to comment.