From d17cd59af81b6d485fd141d52cb9ef31d755e816 Mon Sep 17 00:00:00 2001 From: Maximilien LEDOUX Date: Sat, 19 Mar 2022 12:46:13 +0100 Subject: [PATCH] =?UTF-8?q?Nouvelles=20Regex=20:=20CLIENT=5FFILE=5FLIST=20?= =?UTF-8?q?valid=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../protocol/rules/reader/FilelistRule.java | 6 ++++-- app/src/main/resources/appdata.json | 17 +---------------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/app/src/main/java/lightcontainer/protocol/rules/reader/FilelistRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/FilelistRule.java index 18bfeea..fea0128 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/FilelistRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/FilelistRule.java @@ -7,16 +7,18 @@ import lightcontainer.protocol.rules.writer.FilesRule; import java.util.List; +import static lightcontainer.protocol.StandardizedDefinitions.CLIENT_FILE_LIST; + /** * Règle permettant de récupérer la liste des fichiers d'un utilisateur */ public class FilelistRule extends ProtocolReader { // Constants - private static final String PATTERN = "^FILELIST\r\n$"; + private static final String PATTERN = CLIENT_FILE_LIST; private static final String NAME = "FILELIST"; - private ProtocolRepository protocolRep; + private final ProtocolRepository protocolRep; // Constructor public FilelistRule(ProtocolRepository protocolRep) { diff --git a/app/src/main/resources/appdata.json b/app/src/main/resources/appdata.json index a99218c..e3bd969 100644 --- a/app/src/main/resources/appdata.json +++ b/app/src/main/resources/appdata.json @@ -1,16 +1 @@ -{ - "unicast_port": 8000, - "multicast_ip": "224.66.66.1", - "multicast_port": 15502, - "network_interface": "lo", - "tls": true, - "storagePath": "C:\\Users\\ledou\\Documents\\ffe", - "users": [ - { - "name": "aaaaa", - "password": "$2a$10$Tuh5xmGEy0g26hQO1SHNY.TNy8rY9VCkpzRLP3rlpnVHtwYew4.km", - "aes_key": "a68CqbWmmf0cuvgvMhm9OC+Y24ut3DY/0WBqtd3nGfU=", - "files": [] - } - ] -} \ No newline at end of file +{"unicast_port":8000,"multicast_ip":"224.66.66.1","multicast_port":15502,"network_interface":"lo","tls":true,"storagePath":"C:\\Users\\ledou\\Documents\\ffe","users":[{"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"]}]}]} \ No newline at end of file