From 4fac3a6d52c826a506aeb26593a59c74dd81bfc4 Mon Sep 17 00:00:00 2001 From: Maximilien LEDOUX Date: Sat, 19 Mar 2022 12:49:49 +0100 Subject: [PATCH] =?UTF-8?q?Nouvelles=20Regex=20:=20CLIENT=5FREMOVE=5FFILE?= =?UTF-8?q?=20valid=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../protocol/rules/reader/RemoveFileRule.java | 7 +++++-- app/src/main/resources/appdata.json | 12 +----------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/lightcontainer/protocol/rules/reader/RemoveFileRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/RemoveFileRule.java index 2ec6135..07ba95e 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/RemoveFileRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/RemoveFileRule.java @@ -3,15 +3,18 @@ package lightcontainer.protocol.rules.reader; import lightcontainer.domains.client.Context; import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.protocol.ProtocolReader; +import lightcontainer.protocol.StandardizedDefinitions; import lightcontainer.protocol.rules.writer.EraseFileRule; import lightcontainer.protocol.rules.writer.RemoveFileErrorRule; import lightcontainer.storage.ReadOnlyFile; import java.util.Iterator; -public class RemoveFileRule extends ProtocolReader { +import static lightcontainer.protocol.StandardizedDefinitions.CLIENT_REMOVE_FILE; - private static final String PATTERN = "^REMOVEFILE ([^ !]{1,20})\r\n$"; +public class RemoveFileRule extends ProtocolReader { + //"^REMOVEFILE ([^ !]{1,20})\r\n$" + private static final String PATTERN = CLIENT_REMOVE_FILE; private static final String NAME = "REMOVEFILE"; diff --git a/app/src/main/resources/appdata.json b/app/src/main/resources/appdata.json index 5be4580..a99218c 100644 --- a/app/src/main/resources/appdata.json +++ b/app/src/main/resources/appdata.json @@ -10,17 +10,7 @@ "name": "aaaaa", "password": "$2a$10$Tuh5xmGEy0g26hQO1SHNY.TNy8rY9VCkpzRLP3rlpnVHtwYew4.km", "aes_key": "a68CqbWmmf0cuvgvMhm9OC+Y24ut3DY/0WBqtd3nGfU=", - "files": [ - { - "name": "test.txt", - "fileNameSalt": "3yLVBqM/zf8CcCFPqdh15Q==", - "size": 301, - "iv": "WfokhcAIefnnZnk3sYLjiA==", - "storage": [ - "lightcontainerSB01" - ] - } - ] + "files": [] } ] } \ No newline at end of file