From 8c2ad17bd876ee5fca49fd166f9432c939418876 Mon Sep 17 00:00:00 2001 From: Maximilien LEDOUX Date: Sun, 13 Mar 2022 15:50:40 +0100 Subject: [PATCH] Ajout TODO suppression fichier temporaire dans le FFE --- .../protocol/rules/reader/SendErrorRule.java | 1 + .../protocol/rules/reader/SendOkRule.java | 1 + .../protocol/rules/writer/SendfileRule.java | 1 - app/src/main/resources/appdata.json | 49 +------------------ 4 files changed, 4 insertions(+), 48 deletions(-) diff --git a/app/src/main/java/lightcontainer/protocol/rules/reader/SendErrorRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/SendErrorRule.java index 83653fc..dbcbe28 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/SendErrorRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/SendErrorRule.java @@ -29,6 +29,7 @@ public class SendErrorRule extends ProtocolReader { protected ProtocolResult onExecuted(Context context, String... data) { ProtocolResult result = new ProtocolResult(context); result.setResultCommand(protocolRep.executeWriter(context, SaveFileErrorRule.NAME), ResultCmdReceiver.CLIENT); + // TODO : Supprimer le fichier du FFE return result; } } diff --git a/app/src/main/java/lightcontainer/protocol/rules/reader/SendOkRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/SendOkRule.java index c0a9275..04522e4 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/SendOkRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/SendOkRule.java @@ -33,6 +33,7 @@ public class SendOkRule extends ProtocolReader { System.out.println("Save en json du fichier"); context.addFile(context.getDataString("fileName"), context.getDataString("fileNameSalt"), context.getDataInt("size"), context.getDataString("iv"), context.getDomain()); + // TODO : Supprimer le fichier du FFE return result; } } diff --git a/app/src/main/java/lightcontainer/protocol/rules/writer/SendfileRule.java b/app/src/main/java/lightcontainer/protocol/rules/writer/SendfileRule.java index 3bb8ef6..e6971cc 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/writer/SendfileRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/writer/SendfileRule.java @@ -48,7 +48,6 @@ public class SendfileRule extends ProtocolWriter { FileSender fileSender = new FileSender(storagePath); fileSender.sendFile(hashedFileName, writer); - // TODO : Supprimer le fichier du FFE } } diff --git a/app/src/main/resources/appdata.json b/app/src/main/resources/appdata.json index 48d6ee8..f2068c3 100644 --- a/app/src/main/resources/appdata.json +++ b/app/src/main/resources/appdata.json @@ -4,59 +4,14 @@ "multicast_port": 15502, "network_interface": "My network interface", "tls": true, - "storagePath": "D:\\ffe", + "storagePath": "C:\\Users\\ledou\\Documents\\ffe", "users": [ - { - "name": "endmove", - "password": "1f82407cace28cd7d97d23f82e8235d9da97575d033a12334fc71d3517f6a90fa04af829df3c722c38d3b68842e4ca2b", - "aes_key": "p0G+iViPp656O6aMKgcXSDT/e9/00wQH/ztUWf4tyr4=", - "passwordSalt": "ItYiXkwPa84Gwb6dGHQvXQ==", - "files": [ - { - "name": "HELMo.png", - "fileNameSalt": "tadvzRunAGiu0Z059eBPLQ==", - "size": 130146, - "iv": "26s0BqNqVSbzN1lASkUzgQ==", - "storage": [ - "lightcontainerSB01" - ] - }, - { - "name": "apache2.conf", - "fileNameSalt": "C5GNkws8l2HrhIdF7gmG6w==", - "size": 12648, - "iv": "hQx69qQj1ynaxZZ9wAxpbA==", - "storage": [ - "lightcontainerSB01" - ] - } - ] - }, { "name": "aaaaa", "password": "5d628c274ebb008324f1e199d3bfff0a3fe839730a7f2355e82850d7acca5e5ca64db9071abf3d91034295695f84a617", "aes_key": "qlTH6TijnfMRnrS0Qf+k6IPKGp5LoRMXGxCq16e+mF4=", "passwordSalt": "Ns8Al6DpqPsIDlCSRBVTEg==", - "files": [ - { - "name": "ca.crt", - "fileNameSalt": "Mjo7iQeEl2PYX1RDUZbSlQ==", - "size": 4207, - "iv": "uALI+Feo1lIg1lBxbCMwIQ==", - "storage": [ - "lightcontainerSB01" - ] - }, - { - "name": "main.py", - "fileNameSalt": "YRwnBiXINCJ+zyxwADgNRQ==", - "size": 854, - "iv": "9LXrJFtcgU4DeUBghc4Dgw==", - "storage": [ - "lightcontainerSB01" - ] - } - ] + "files": [] } ] } \ No newline at end of file