Skip to content

Commit 78d1796

Browse files
committed
define significant bytes to remove erroneous padding for attachments
1 parent bcdc8c3 commit 78d1796

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

packages/common/src/fixtures/upload/file-upload.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<bind nodeset="/data/doc" type="binary" />
2727
<bind nodeset="/data/anything" type="binary" required="true()" />
2828
<bind nodeset="/data/disabled" type="binary" readonly="true()" />
29+
<bind jr:preload="uid" nodeset="/data/meta/instanceID" readonly="true()" type="string"/>
2930
</model>
3031
</h:head>
3132
<h:body>

packages/xforms-engine/src/lib/client-reactivity/instance-state/quarantine/symmetric.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const arrayBufferToWordArray = (buffer: Uint8Array<ArrayBuffer>) => {
1414
(buffer[i]! << 24) | (buffer[i + 1]! << 16) | (buffer[i + 2]! << 8) | buffer[i + 3]!
1515
);
1616
}
17-
return CryptoJS.lib.WordArray.create(bytes);
17+
return CryptoJS.lib.WordArray.create(bytes, buffer.byteLength);
1818
};
1919

2020
const wordArrayToArrayBuffer = (wordArray: CryptoJS.lib.WordArray): Uint8Array<ArrayBuffer> => {

0 commit comments

Comments
 (0)