Regex : modif

This commit is contained in:
Maximilien LEDOUX 2022-03-15 17:21:21 +01:00
parent b3fc637914
commit c0ec403ec2
2 changed files with 2 additions and 6 deletions

View File

@ -13,15 +13,13 @@ import lightcontainer.utils.ShaHasher;
import java.io.IOException;
import java.io.InputStream;
import static lightcontainer.protocol.StandardizedDefinitions.CLIENT_SAVE_FILE;
/**
* Règle permettant de sauvegarder un fichier sur le SBE.
* Celui-ci va chiffre le contenu du fichier à l'aide de AES.
*/
public class SavefileRule extends ProtocolReader {
// Constants
private static final String PATTERN = CLIENT_SAVE_FILE;
private static final String PATTERN = "^SAVE_FILE ([^ !]{1,20}) ([0-9]{1,10})\r\n$";
private static final String NAME = "SAVEFILE";

View File

@ -6,14 +6,12 @@ import lightcontainer.utils.FileSender;
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 = FFE_SENDFILE;
private static final String PATTERN = "^SENDFILE [A-Za-z0-9]{50,200} [0-9]{1,10} [A-Za-z0-9]{50,200}\\r\\n$";
public static final String NAME = "SENDFILE";