This repository was archived by the owner on Apr 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 150
Export of encrypted submissions using Briefcase UI fails #902
Copy link
Copy link
Open
Description
Software versions
Briefcase v1.18.0, Java v1.8.0_292
Problem description
Exporting encrypted submissions fail due to duplicate xmlns tag in the stored ODK Briefcase pulled submission (error attached below). The extra xmlns tag is not present when retrieved from https://stage-api.ona.io; seems it's added during the download process
2021-05-06 17:02:48,779 [ForkJoinPool-5-worker-1] ERROR o.o.b.export.SubmissionParser - Parse error attempting to read instance date
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,286]
Message: Attribute "xmlns" was already specified for element "n0:data".
Steps to reproduce the problem
- Create an encrypted form on an ODK Aggregate server of your choice. I used https://stage-api.ona.io in this case
- Make a few submissions to the form
- Try to pull and export form data
Expected behavior
When submissions are pulled the additional xmlns attribute should not be added to the downloaded submission and the export should complete sucessfully. The extra xmlns seems to be the one from the submission node...
Other information
- Removing one of the
xmlnsattributes successfully exports the submission
Briefcase submission XML:
<n0:data encrypted="yes" id="a97HQYbA5ufGxRYY3H4vE5" instanceID="uuid:2cab3370-d15c-4f4d-a3bb-34f1f6a80706" submissionDate="2021-04-27T09:08:09.745247+00:00" version="vWZnSVN3reoFBd3EwA3qna"
xmlns="http://www.opendatakit.org/xforms/encrypted"
xmlns="http://opendatakit.org/submissions"
xmlns:n0="http://www.opendatakit.org/xforms/encrypted">
<n0:base64EncryptedKey>s+skAk7Ie2X5/+ol/orEvIwNwQJKT0Zxdb3HDf/+OtprgGMmu4c3yU5MeGrpko1G38i8v8nxb7OryADkdL9UG0iJUqDX3lroZRGaKXb74P+IASePKFYfgT68uBhnUpGxbVTYjh2bRgCBUIb+RLQFBo3QvdK/VB1ukE9c4LZNNbS8dk7dv7450koMxLLSliemRzW15BXWvDZCdjWN6WgnLLsd7Y9jZHXfDii35Bg5L1s0UGFy6CU/m3N0Irg9teW2CHn+gEfPlvKZLPs5oDXqmiD+ABeW8aRPkFYRGA0WcRlbscS0TJAUliDUCw5rhDNWgYps11t/yEVwG9Gox8MJiA==</n0:base64EncryptedKey>
<orx:meta xmlns:orx="http://openrosa.org/xforms">
<orx:instanceID>uuid:2cab3370-d15c-4f4d-a3bb-34f1f6a80706</orx:instanceID>
</orx:meta>
<n0:encryptedXmlFile>submission.xml.enc</n0:encryptedXmlFile>
<n0:base64EncryptedElementSignature>BUMJ3QAx4wlPtQaNXmOR5khpg9k5PMrugCD3aHawgok0xflSBoPdFqQtw8n5khhrHDfAjqQimCmkbDJDHfsHOQB86VAvmXh6zt7q0JklK//VyDsV+ghtZvHaAxLLHImsuwYRPSB9ZOirJaWGW4BEODdW9/gujgC9yJCgXw94b9asn/Q4I+ZhvDn+tIm8hhOrxWb7u3NptklusnzRY6OclthO0yFJnlXo34dMgVwTrMrs0rmbhVQpMiamHsa9ClYDchtFe5FZBklOrIFLKpnH9Ay/HeCsWYZkSeeJAJgOYGqNs1CFUwvTeukW0UiZ/LQgGdEsF1HNVY73jAD0v2lsVw==</n0:base64EncryptedElementSignature>
</n0:data>
Server XML:
<submission xmlns="<a href="http://opendatakit.org/submissions" rel="nofollow">http://opendatakit.org/submissions</a>"
xmlns:orx="<a href="http://openrosa.org/xforms" rel="nofollow">http://openrosa.org/xforms</a>">
<data>
<data encrypted="yes" id="a97HQYbA5ufGxRYY3H4vE5" instanceID="uuid:2cab3370-d15c-4f4d-a3bb-34f1f6a80706" submissionDate="2021-04-27T09:08:09.745247+00:00" version="vWZnSVN3reoFBd3EwA3qna"
xmlns="<a href="http://www.opendatakit.org/xforms/encrypted" rel="nofollow">http://www.opendatakit.org/xforms/encrypted</a>">
<base64EncryptedKey>s+skAk7Ie2X5/+ol/orEvIwNwQJKT0Zxdb3HDf/+OtprgGMmu4c3yU5MeGrpko1G38i8v8nxb7OryADkdL9UG0iJUqDX3lroZRGaKXb74P+IASePKFYfgT68uBhnUpGxbVTYjh2bRgCBUIb+RLQFBo3QvdK/VB1ukE9c4LZNNbS8dk7dv7450koMxLLSliemRzW15BXWvDZCdjWN6WgnLLsd7Y9jZHXfDii35Bg5L1s0UGFy6CU/m3N0Irg9teW2CHn+gEfPlvKZLPs5oDXqmiD+ABeW8aRPkFYRGA0WcRlbscS0TJAUliDUCw5rhDNWgYps11t/yEVwG9Gox8MJiA==</base64EncryptedKey>
<orx:meta xmlns:orx="<a href="http://openrosa.org/xforms" rel="nofollow">http://openrosa.org/xforms</a>">
<orx:instanceID>uuid:2cab3370-d15c-4f4d-a3bb-34f1f6a80706</orx:instanceID>
</orx:meta>
<encryptedXmlFile>submission.xml.enc</encryptedXmlFile>
<base64EncryptedElementSignature>BUMJ3QAx4wlPtQaNXmOR5khpg9k5PMrugCD3aHawgok0xflSBoPdFqQtw8n5khhrHDfAjqQimCmkbDJDHfsHOQB86VAvmXh6zt7q0JklK//VyDsV+ghtZvHaAxLLHImsuwYRPSB9ZOirJaWGW4BEODdW9/gujgC9yJCgXw94b9asn/Q4I+ZhvDn+tIm8hhOrxWb7u3NptklusnzRY6OclthO0yFJnlXo34dMgVwTrMrs0rmbhVQpMiamHsa9ClYDchtFe5FZBklOrIFLKpnH9Ay/HeCsWYZkSeeJAJgOYGqNs1CFUwvTeukW0UiZ/LQgGdEsF1HNVY73jAD0v2lsVw==</base64EncryptedElementSignature>
</data>
</data>
<mediaFile>
<filename>submission.xml.enc</filename>
<hash>md5:b111679e619189d6398acb50e5bac43c</hash>
<downloadUrl>
<a href="https://stage-api.ona.io/attachment/original?media_file=25032000%2Fattachments%2F1415_a97HQYbA5ufGxRYY3H4vE5%2Fsubmission.xml_cs1q0tX.enc" rel="nofollow">https://stage-api.ona.io/attachment/original?media_file=25032000/attachments/1415_a97HQYbA5ufGxRYY3H4vE5/submission.xml_cs1q0tX.enc</a>
</downloadUrl>
</mediaFile>
</submission>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels