nuxt-webhook-validators
Advanced tools
+3
-3
@@ -7,7 +7,7 @@ { | ||
| }, | ||
| "version": "0.2.2", | ||
| "version": "0.2.3", | ||
| "builder": { | ||
| "@nuxt/module-builder": "1.0.1", | ||
| "unbuild": "3.5.0" | ||
| "@nuxt/module-builder": "1.0.2", | ||
| "unbuild": "3.6.0" | ||
| } | ||
| } |
@@ -12,2 +12,3 @@ import { getRequestHeaders, readRawBody } from "h3"; | ||
| const [, algorithm, hash] = match; | ||
| if (!algorithm || !hash) return false; | ||
| const normalizedAlgorithm = algorithm.replace("-", "").toLowerCase(); | ||
@@ -19,3 +20,3 @@ if (!["sha256"].includes(normalizedAlgorithm)) return false; | ||
| const signatureMatch = signatureHeader.match(/sig_\d+=:([^:]+):/); | ||
| return signatureMatch ? signatureMatch[1] : null; | ||
| return signatureMatch && signatureMatch[1] ? signatureMatch[1] : null; | ||
| }; | ||
@@ -28,3 +29,3 @@ const extractInputValues = (header) => { | ||
| name: match[1], | ||
| timestamp: Number.parseInt(match[3], 10), | ||
| timestamp: Number.parseInt(match[3] || "", 10), | ||
| algorithm: match[4], | ||
@@ -31,0 +32,0 @@ keyId: match[5] |
@@ -16,2 +16,3 @@ import { getRequestHeaders, readRawBody } from "h3"; | ||
| const secretKey = config.secretKey.split("_")[1]; | ||
| if (!secretKey) return false; | ||
| const signatureEntries = webhookSignature.split(" "); | ||
@@ -18,0 +19,0 @@ for (const signatureEntry of signatureEntries) { |
+16
-16
| { | ||
| "name": "nuxt-webhook-validators", | ||
| "version": "0.2.2", | ||
| "version": "0.2.3", | ||
| "description": "A simple nuxt module that works on the edge to easily validate incoming webhooks from different services.", | ||
@@ -34,5 +34,5 @@ "keywords": [ | ||
| "prepack": "nuxt-module-build build", | ||
| "dev": "nuxi dev playground", | ||
| "dev:build": "nuxi build playground", | ||
| "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground", | ||
| "dev": "nuxt dev playground", | ||
| "dev:build": "nuxt build playground", | ||
| "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground", | ||
| "release": "npm run lint && npm run prepack && npm run test && changelogen --release && npm publish && git push --follow-tags", | ||
@@ -42,7 +42,7 @@ "lint": "eslint .", | ||
| "test": "vitest run --reporter=verbose", | ||
| "test:types": "vue-tsc --noEmit", | ||
| "test:types": "vue-tsc --noEmit && cd playground && vue-tsc -b --noEmit", | ||
| "test:watch": "vitest watch" | ||
| }, | ||
| "dependencies": { | ||
| "@nuxt/kit": "^3.17.6", | ||
| "@nuxt/kit": "^4.0.3", | ||
| "defu": "^6.1.4", | ||
@@ -53,15 +53,15 @@ "scule": "^1.3.0" | ||
| "@nuxt/devtools": "^2.6.2", | ||
| "@nuxt/eslint-config": "^1.5.0", | ||
| "@nuxt/module-builder": "^1.0.1", | ||
| "@nuxt/schema": "^3.17.6", | ||
| "@nuxt/eslint-config": "^1.8.0", | ||
| "@nuxt/module-builder": "^1.0.2", | ||
| "@nuxt/schema": "^4.0.3", | ||
| "@nuxt/test-utils": "^3.19.2", | ||
| "@types/node": "^24.0.10", | ||
| "changelogen": "^0.6.1", | ||
| "eslint": "^9.30.1", | ||
| "nuxt": "^3.17.6", | ||
| "typescript": "^5.8.3", | ||
| "@types/node": "^24.2.0", | ||
| "changelogen": "^0.6.2", | ||
| "eslint": "^9.32.0", | ||
| "nuxt": "^4.0.3", | ||
| "typescript": "^5.9.2", | ||
| "vitest": "^3.2.4", | ||
| "vue-tsc": "^3.0.0" | ||
| "vue-tsc": "^3.0.5" | ||
| }, | ||
| "packageManager": "pnpm@10.12.4" | ||
| "packageManager": "pnpm@10.14.0" | ||
| } |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
40987
0.34%747
0.27%+ Added
- Removed
Updated