remix-utils
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -1,2 +0,2 @@ | ||
import { randomBytes } from "crypto"; | ||
import { v4 as uuid } from "uuid"; | ||
import { bodyParser } from "./body-parser"; | ||
@@ -16,3 +16,3 @@ import { unprocessableEntity } from "./responses"; | ||
export function createAuthenticityToken(session, sessionKey = "csrf") { | ||
let token = randomBytes(100).toString("base64"); | ||
let token = uuid(); | ||
session.set(sessionKey, token); | ||
@@ -19,0 +19,0 @@ return token; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.verifyAuthenticityToken = exports.createAuthenticityToken = void 0; | ||
const crypto_1 = require("crypto"); | ||
const uuid_1 = require("uuid"); | ||
const body_parser_1 = require("./body-parser"); | ||
@@ -19,3 +19,3 @@ const responses_1 = require("./responses"); | ||
function createAuthenticityToken(session, sessionKey = "csrf") { | ||
let token = crypto_1.randomBytes(100).toString("base64"); | ||
let token = uuid_1.v4(); | ||
session.set(sessionKey, token); | ||
@@ -22,0 +22,0 @@ return token; |
{ | ||
"name": "remix-utils", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"license": "MIT", | ||
@@ -60,2 +60,3 @@ "engines": { | ||
"@types/react": "^17.0.14", | ||
"@types/uuid": "^8.3.3", | ||
"@typescript-eslint/eslint-plugin": "^5.3.0", | ||
@@ -87,4 +88,5 @@ "@typescript-eslint/parser": "^5.3.0", | ||
"prettier": "^2.4.1", | ||
"type-fest": "^2.5.2" | ||
"type-fest": "^2.5.2", | ||
"uuid": "^8.3.2" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91527
6
36
+ Addeduuid@^8.3.2
+ Addeduuid@8.3.2(transitive)