diff --git a/src/main.h b/src/main.h index bc47193..b0e0b46 100644 --- a/src/main.h +++ b/src/main.h @@ -13,8 +13,8 @@ // Using CRELAY_ prefix to avoid conflicts with nostr_core_lib VERSION macros #define CRELAY_VERSION_MAJOR 1 #define CRELAY_VERSION_MINOR 2 -#define CRELAY_VERSION_PATCH 3 -#define CRELAY_VERSION "v1.2.3" +#define CRELAY_VERSION_PATCH 4 +#define CRELAY_VERSION "v1.2.4" // Relay metadata (authoritative source for NIP-11 information) #define RELAY_NAME "C-Relay" diff --git a/src/subscriptions.c b/src/subscriptions.c index 4755af0..8a40e64 100644 --- a/src/subscriptions.c +++ b/src/subscriptions.c @@ -266,10 +266,13 @@ int validate_subscription_id(const char* sub_id) { } // Check for valid characters (alphanumeric, underscore, hyphen, colon, comma, plus) + // Plus URL-safe special characters: ! $ % & ( ) * . = ? @ # ~ for (size_t i = 0; i < len; i++) { char c = sub_id[i]; if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || - (c >= '0' && c <= '9') || c == '_' || c == '-' || c == ':' || c == ',' || c == '+')) { + (c >= '0' && c <= '9') || c == '_' || c == '-' || c == ':' || c == ',' || c == '+' || + c == '!' || c == '$' || c == '%' || c == '&' || c == '(' || c == ')' || + c == '*' || c == '.' || c == '=' || c == '?' || c == '@' || c == '#' || c == '~')) { return 0; // Invalid character } }