From 81d44c3d8c8472383500f099258f6204c2a23163 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 11 Feb 2026 05:56:09 -0400 Subject: [PATCH] v1.2.4 - Add more characters to valid subscription characters --- src/main.h | 4 ++-- src/subscriptions.c | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) 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 } }