@bdking71/spsignature 1.3.7 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -150,4 +150,4 @@ export declare function getReportableSignature(compressedSignatureData: string):
|
|
|
150
150
|
* }
|
|
151
151
|
* ```
|
|
152
152
|
*/
|
|
153
|
-
export declare function verifySecureAuditRecord(auditRecord: SharePointAuditRecord, signer: string, payload: Record<string, unknown
|
|
153
|
+
export declare function verifySecureAuditRecord(auditRecord: SharePointAuditRecord, signer: string, payload: Record<string, unknown>, itemID?: number): Promise<boolean>;
|
package/lib/TransactionSigner.js
CHANGED
|
@@ -1346,7 +1346,7 @@ function isCanvasEmpty(ctx, width, height) {
|
|
|
1346
1346
|
* }
|
|
1347
1347
|
* ```
|
|
1348
1348
|
*/
|
|
1349
|
-
async function verifySecureAuditRecord(auditRecord, signer, payload) {
|
|
1349
|
+
async function verifySecureAuditRecord(auditRecord, signer, payload, itemID) {
|
|
1350
1350
|
try {
|
|
1351
1351
|
if (!auditRecord || !signer || !payload) {
|
|
1352
1352
|
return false;
|
|
@@ -1358,11 +1358,12 @@ async function verifySecureAuditRecord(auditRecord, signer, payload) {
|
|
|
1358
1358
|
const normalizedTimestamp = auditRecord.signatureTimestamp.trim();
|
|
1359
1359
|
const normalizedHash = auditRecord.signatureHash.trim();
|
|
1360
1360
|
validateJsonSerializable(payload);
|
|
1361
|
-
const deepSortedPayload = deepSortPayload(payload);
|
|
1361
|
+
const deepSortedPayload = deepSortPayload(payload); // ← CAST THIS
|
|
1362
1362
|
const auditEnvelope = {
|
|
1363
1363
|
payload: deepSortedPayload,
|
|
1364
1364
|
signer: normalizedSigner,
|
|
1365
1365
|
timestamp: normalizedTimestamp,
|
|
1366
|
+
itemID: itemID, // ← Already added
|
|
1366
1367
|
};
|
|
1367
1368
|
const auditEnvelopeJson = JSON.stringify(auditEnvelope);
|
|
1368
1369
|
const encoder = new TextEncoder();
|
package/package.json
CHANGED