From 8718d9c4ea02bcbdee9dd324e8b9d349a72e1bde Mon Sep 17 00:00:00 2001 From: Maximilien LEDOUX Date: Sat, 19 Mar 2022 13:56:23 +0100 Subject: [PATCH] =?UTF-8?q?Nouvelles=20Regex=20:=20FFE=5FSENDFILE=20valid?= =?UTF-8?q?=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lightcontainer/protocol/rules/writer/SendfileRule.java | 5 ++++- app/src/main/resources/appdata.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) 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 19abaca..aa44928 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/writer/SendfileRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/writer/SendfileRule.java @@ -2,17 +2,20 @@ package lightcontainer.protocol.rules.writer; import lightcontainer.domains.client.Context; import lightcontainer.protocol.ProtocolWriter; +import lightcontainer.protocol.StandardizedDefinitions; import lightcontainer.utils.FileSender; import java.io.IOException; import java.io.OutputStream; +import static lightcontainer.protocol.StandardizedDefinitions.FFE_SENDFILE; + /** * Règle envoyée au SBE, demandant la sauvegarde d'un fichier. */ public class SendfileRule extends ProtocolWriter { //"^SENDFILE [A-Za-z0-9]{50,200} [0-9]{1,10} [A-Za-z0-9]{50,200}\r\n$" - private static final String PATTERN = "^SENDFILE [A-Za-z0-9]{50,200} [0-9]{1,10} [A-Za-z0-9]{50,200}\\r\\n$"; + private static final String PATTERN = FFE_SENDFILE; public static final String NAME = "SENDFILE"; diff --git a/app/src/main/resources/appdata.json b/app/src/main/resources/appdata.json index 267cc92..2f83c00 100644 --- a/app/src/main/resources/appdata.json +++ b/app/src/main/resources/appdata.json @@ -1 +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$Up/pME2iFKALVSu8/JDpG.8Vc2vidOm99SeVoayCB1th7KHMZ1gq2","aes_key":"4+D3geivckhduP14646nYBb91N71HJj+8uvHFb0su0o=","files":[{"name":"test.txt","fileNameSalt":"QTWuH0rNYf0+8ondzDlFeA==","size":301,"iv":"r+Lw9Qpo5Ca7cO45MytKwA==","storage":["lightcontainerSB01"]},{"name":"regex.txt","fileNameSalt":"hPTgHiTySuUiJE0I4QD1Gw==","size":1320,"iv":"Uw7pAMKAEJRL/vn2NJ//wA==","storage":["lightcontainerSB01"]}]}]} \ 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$Up/pME2iFKALVSu8/JDpG.8Vc2vidOm99SeVoayCB1th7KHMZ1gq2","aes_key":"4+D3geivckhduP14646nYBb91N71HJj+8uvHFb0su0o=","files":[{"name":"test.txt","fileNameSalt":"JNJhoZl+MEBAZ+YSvpaCAg==","size":301,"iv":"eHHLWbm3Wry49SIkgofVTg==","storage":["lightcontainerSB01"]}]}]} \ No newline at end of file