Compare commits

...
Author SHA1 Message Date
prafull-opensignlabs 481c0143fc fix: avoid generating repetitive widgets Id 2025-06-02 10:40:14 +00:00
3 changed files with 13 additions and 7 deletions
+8 -4
View File
@@ -683,10 +683,14 @@ export const signPdfFun = async (
}; };
export const randomId = () => { export const randomId = () => {
const randomBytes = crypto.getRandomValues(new Uint16Array(1)); // 1. Grab a cryptographically-secure 32-bit random value
const randomValue = randomBytes[0]; const randomBytes = crypto.getRandomValues(new Uint32Array(1));
const randomDigit = 1000 + (randomValue % 9000); const raw = randomBytes[0]; // 0 … 4 294 967 295
return randomDigit;
// 2. Collapse into a 90 000 000-wide band (0…89 999 999), then shift to 10 000 000…99 999 999
const eightDigit = 10_000_000 + (raw % 90_000_000);
return eightDigit;
}; };
export const createDocument = async ( export const createDocument = async (
+2 -2
View File
@@ -455,7 +455,7 @@ const Forms = (props) => {
setBcc([]); setBcc([]);
setFolder({ ObjectId: "", Name: "" }); setFolder({ ObjectId: "", Name: "" });
const notifySign = const notifySign =
extUserData?.NotifyOnSignatures extUserData?.NotifyOnSignatures !== undefined
? extUserData?.NotifyOnSignatures ? extUserData?.NotifyOnSignatures
: true; : true;
setFormData({ setFormData({
@@ -534,7 +534,7 @@ const Forms = (props) => {
setBcc([]); setBcc([]);
setFolder({ ObjectId: "", Name: "" }); setFolder({ ObjectId: "", Name: "" });
const notifySign = const notifySign =
extUserData?.NotifyOnSignatures extUserData?.NotifyOnSignatures !== undefined
? extUserData?.NotifyOnSignatures ? extUserData?.NotifyOnSignatures
: true; : true;
let obj = { let obj = {
+2
View File
@@ -1,6 +1,8 @@
# Use an official Node runtime as the base image # Use an official Node runtime as the base image
FROM node:22.14.0 FROM node:22.14.0
RUN wget https://download.oracle.com/java/23/archive/jdk-23_linux-x64_bin.deb \
&& dpkg -i jdk-23_linux-x64_bin.deb
# Set the working directory inside the container # Set the working directory inside the container
WORKDIR /usr/src/app WORKDIR /usr/src/app