mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-05 01:07:39 +02:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
481c0143fc |
@@ -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 (
|
||||||
@@ -1552,7 +1556,7 @@ export const multiSignEmbed = async (
|
|||||||
let hasError = false;
|
let hasError = false;
|
||||||
for (let item of widgets) {
|
for (let item of widgets) {
|
||||||
//pdfOriginalWH contained all pdf's pages width and height
|
//pdfOriginalWH contained all pdf's pages width and height
|
||||||
//'getSize' is used to get particular pdf's page width and height
|
//'getSize' is used to get particular pdf's page width and height
|
||||||
const getSize = pdfOriginalWH.find(
|
const getSize = pdfOriginalWH.find(
|
||||||
(page) => page?.pageNumber === item?.pageNumber
|
(page) => page?.pageNumber === item?.pageNumber
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -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 = {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user