From 60f312ce19433cc6e4d9216754b56f5d60513625 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sat, 4 Feb 2023 19:17:27 +0100 Subject: [PATCH] blocking numbers and '-' in why2_set_encryption_separator --- src/core/lib/flags.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/lib/flags.c b/src/core/lib/flags.c index b9eff12..6e58476 100644 --- a/src/core/lib/flags.c +++ b/src/core/lib/flags.c @@ -101,7 +101,7 @@ char *get_last_node_identifier(void) //GETTERS char why2_get_encryption_separator(void) { - return encryptionSeparator; + return encryption_separator; } unsigned long why2_get_key_length(void) @@ -157,7 +157,12 @@ char *why2_get_default_memory_identifier(void) //SETTERS void why2_set_encryption_separator(char encryption_separator_new) { - if (encryptionSeparatorNew <= 31) return; + if + ( + encryption_separator_new <= 31 || + (encryption_separator_new >= 48 && encryption_separator_new <= 57) || + encryption_separator_new == 45 + ) return; encryption_separator = encryption_separator_new; }