From 713e930eb935ea2627e2841e2e1e721c0284ec53 Mon Sep 17 00:00:00 2001 From: Maximilien LEDOUX Date: Sat, 19 Mar 2022 13:13:02 +0100 Subject: [PATCH] =?UTF-8?q?Nouvelles=20Regex=20:=20CLIENT=5FSIGN=5FUP=20va?= =?UTF-8?q?lid=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../protocol/rules/reader/SignupRule.java | 6 +++++- app/src/main/resources/appdata.json | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/lightcontainer/protocol/rules/reader/SignupRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/SignupRule.java index 8f27cb4..ebf7468 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/SignupRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/SignupRule.java @@ -3,15 +3,19 @@ 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.SignErrorRule; import lightcontainer.protocol.rules.writer.SignOkRule; +import static lightcontainer.protocol.StandardizedDefinitions.CLIENT_SIGN_UP; + /** * Règle permettant de gérer la création d'un utilisateur */ public class SignupRule extends ProtocolReader { // Constants - private static final String PATTERN = "^SIGNUP ([A-Za-z0-9]{5,20}) ([^ !]{5,50})\r\n$"; + //"^SIGNUP ([A-Za-z0-9]{5,20}) ([^ !]{5,50})\r\n$" + private static final String PATTERN = CLIENT_SIGN_UP; private static final String NAME = "SIGNUP"; private static final int LOGIN = 0; private static final int PASSWORD = 1; diff --git a/app/src/main/resources/appdata.json b/app/src/main/resources/appdata.json index 27d00bb..84b0f15 100644 --- a/app/src/main/resources/appdata.json +++ b/app/src/main/resources/appdata.json @@ -1 +1,16 @@ -{"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":"RlrRzOXSrcetsVQjqOKB6g==","size":301,"iv":"NHrHwZRdshh5JQQA5Sw/UA==","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": [] + } + ] +} \ No newline at end of file