mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-08 02:37:40 +02:00
v2.12.0
feat: create duplicate template functionality feat: add support of csv and xlsx for bulk contacts import feat: add info text for forms and dashboard button feat: implement functionality to delete a PDF page while editing the document feat: show completed documents in which signers included but not owner in completed reports feat: add delete folder button in opensign drive feat: introduce Bcc email support for sending completed documents feat: allow merging multiple pdf while drafting document and template feat: add 'My Initials' tab for auto-signing in request-sign flow feat: add support for redirect URL to navigate after document completion feat: introduce privacy policy and digital signature terms before signing documents. feat: add feature to allow adding new pages to existing document feat: add save signature, initials, stamp functionality in sign pad for logged in user feat: add preferences menu feat: add save custom email template, notifyonsignature, set timezone, allow signature types in preferences feat: secure local url feat: implement Italian language translation feat: implement German language translation feat: update menu name from report to documents and shift contactbook in main menu feat: provide edit contact functionality fix: unable to delete folder when all its documents are deleted fix: fields.push is not function fix: document loading issue in opensign drive fix: adjust the guest signature flow to display the document in full screen, eliminating any blank space which is displayed below the place holder in mobile view fix: resolve issue of instance of pdfdict or pdfstream but got undefined build(deps): update dependencies refactor: change note text from add contact form
This commit is contained in:
@@ -15,11 +15,14 @@ import AWS from 'aws-sdk';
|
||||
import { app as customRoute } from './cloud/customRoute/customApp.js';
|
||||
import { exec } from 'child_process';
|
||||
import { createTransport } from 'nodemailer';
|
||||
import { app as v1 } from './cloud/customRoute/v1/apiV1.js';
|
||||
import { PostHog } from 'posthog-node';
|
||||
import { appName, cloudServerUrl, smtpenable, smtpsecure, useLocal } from './Utils.js';
|
||||
import { SSOAuth } from './auth/authadapter.js';
|
||||
import createContactIndex from './migrationdb/createContactIndex.js';
|
||||
import { validateSignedLocalUrl } from './cloud/parsefunction/getSignedUrl.js';
|
||||
import maintenance_mode_message from 'aws-sdk/lib/maintenance_mode_message.js';
|
||||
let fsAdapter;
|
||||
maintenance_mode_message.suppress = true;
|
||||
if (useLocal !== 'true') {
|
||||
try {
|
||||
const spacesEndpoint = new AWS.Endpoint(process.env.DO_ENDPOINT);
|
||||
@@ -33,8 +36,10 @@ if (useLocal !== 'true') {
|
||||
presignedUrl: true,
|
||||
presignedUrlExpires: 900,
|
||||
s3overrides: {
|
||||
accessKeyId: process.env.DO_ACCESS_KEY_ID,
|
||||
secretAccessKey: process.env.DO_SECRET_ACCESS_KEY,
|
||||
credentials: {
|
||||
accessKeyId: process.env.DO_ACCESS_KEY_ID,
|
||||
secretAccessKey: process.env.DO_SECRET_ACCESS_KEY,
|
||||
},
|
||||
endpoint: spacesEndpoint,
|
||||
},
|
||||
};
|
||||
@@ -178,6 +183,28 @@ app.use(function (req, res, next) {
|
||||
}
|
||||
next();
|
||||
});
|
||||
|
||||
app.use(async function (req, res, next) {
|
||||
const isFilePath = req.path.includes('files') || false;
|
||||
if (isFilePath && req.method.toLowerCase() === 'get') {
|
||||
const serverUrl = new URL(process.env.SERVER_URL);
|
||||
const origin = serverUrl.pathname === '/api/app' ? serverUrl.origin + '/api' : serverUrl.origin;
|
||||
const fileUrl = origin + req.originalUrl;
|
||||
const params = fileUrl?.split('?')?.[1];
|
||||
if (params) {
|
||||
const fileRes = await validateSignedLocalUrl(fileUrl);
|
||||
if (fileRes === 'Unauthorized') {
|
||||
return res.status(400).json({ message: 'unauthorized' });
|
||||
}
|
||||
} else {
|
||||
return res.status(400).json({ message: 'unauthorized' });
|
||||
}
|
||||
next();
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
});
|
||||
|
||||
// Serve static assets from the /public folder
|
||||
app.use('/public', express.static(path.join(__dirname, '/public')));
|
||||
|
||||
@@ -190,13 +217,12 @@ if (!process.env.TESTING) {
|
||||
app.use(mountPath, server.app);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
process.exit();
|
||||
}
|
||||
}
|
||||
// Mount your custom express app
|
||||
app.use('/', customRoute);
|
||||
|
||||
// Mount v1
|
||||
app.use('/v1', v1);
|
||||
|
||||
// Parse Server plays nicely with the rest of your web routes
|
||||
app.get('/', function (req, res) {
|
||||
@@ -227,6 +253,7 @@ if (!process.env.TESTING) {
|
||||
console.error(`Error: ${stderr}`);
|
||||
return;
|
||||
}
|
||||
createContactIndex();
|
||||
console.log(`Command output: ${stdout}`);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user