Skip to content

Commit

Permalink
Merge pull request #435 from lf-lang/fix-rti-hostname-regex
Browse files Browse the repository at this point in the history
Support for hyphens and underscores in rti host name
  • Loading branch information
lhstrh authored May 22, 2024
2 parents c7583dc + 0802e00 commit 377283c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/federated/network/net_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ bool extract_match_groups(const char* rti_addr, char** rti_addr_strs, bool** rti
}

void extract_rti_addr_info(const char* rti_addr, rti_addr_info_t* rti_addr_info) {
const char* regex_str = "(([a-zA-Z0-9_-]{1,254})@)?([a-zA-Z0-9.]{1,255})(:([0-9]{1,5}))?";
const char* regex_str = "(([a-zA-Z0-9_-]{1,254})@)?([a-zA-Z0-9._-]{1,255})(:([0-9]{1,5}))?";
size_t max_groups = 6;
// The group indices of each field of interest in the regex.
int user_gid = 2, host_gid = 3, port_gid = 5;
Expand Down

0 comments on commit 377283c

Please sign in to comment.