Skip to content
Snippets Groups Projects
Commit 4dcc34de authored by Klaus Fischer's avatar Klaus Fischer
Browse files

WIP: Test attachments

parent e5342d52
No related branches found
No related tags found
1 merge request!24AutoReject planning#594
...@@ -125,6 +125,7 @@ public class Subscriber : FitConnectClient, ...@@ -125,6 +125,7 @@ public class Subscriber : FitConnectClient,
private SecurityEventToken CheckSubmitEvent(Submission submission) { private SecurityEventToken CheckSubmitEvent(Submission submission) {
var status = GetStatusForSubmission(submission); var status = GetStatusForSubmission(submission);
// TODO: Two different problems more than 1 and no tag
if (status.Count(set => set.EventType == EventType.Submit) != 1) { if (status.Count(set => set.EventType == EventType.Submit) != 1) {
RejectSubmission(submission, Problems.SchemaViolation); RejectSubmission(submission, Problems.SchemaViolation);
throw new Exception("More than one or none submit event found"); throw new Exception("More than one or none submit event found");
...@@ -158,7 +159,6 @@ public class Subscriber : FitConnectClient, ...@@ -158,7 +159,6 @@ public class Subscriber : FitConnectClient,
} }
foreach (var attachment in submission.Attachments) { foreach (var attachment in submission.Attachments) {
// BUG: Attachment.ID is wrong set
if (attachmentSignatures?[attachment.Id] != attachment.AttachmentAuthentication) { if (attachmentSignatures?[attachment.Id] != attachment.AttachmentAuthentication) {
RejectSubmission(submission, Problems.IncorrectAuthenticationTag); RejectSubmission(submission, Problems.IncorrectAuthenticationTag);
throw new AggregateException("Attachment signature mismatch"); throw new AggregateException("Attachment signature mismatch");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment