mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 18:55:19 +00:00 
			
		
		
		
	res_pjsip: Add to list of valid characters for from_user.
Fixes a regression where some characters were unable to be used in the from_user field of an endpoint. Additionally, the backtick was removed from the list of valid characters, since it is not valid, and it was replaced with a single quote, which is a valid character. ASTERISK-27387 Change-Id: Id80c10a644508365c87b3182e99ea49da11b0281
This commit is contained in:
		
				
					committed by
					
						 Benjamin Keith Ford
						Benjamin Keith Ford
					
				
			
			
				
	
			
			
			
						parent
						
							7a75abdf13
						
					
				
				
					commit
					f8e0f9be22
				
			| @@ -1140,11 +1140,11 @@ static int from_user_handler(const struct aco_option *opt, | |||||||
| { | { | ||||||
| 	struct ast_sip_endpoint *endpoint = obj; | 	struct ast_sip_endpoint *endpoint = obj; | ||||||
| 	/* Valid non-alphanumeric characters for URI */ | 	/* Valid non-alphanumeric characters for URI */ | ||||||
| 	char *valid_uri_marks = "-_.!~*`()"; | 	char *valid_uri_marks = "-._~%!$&'()*+,;=:"; | ||||||
| 	const char *val; | 	const char *val; | ||||||
|  |  | ||||||
| 	for (val = var->value; *val; val++) { | 	for (val = var->value; *val; val++) { | ||||||
| 		if (!strchr(valid_uri_marks, *val) && !isdigit(*val) && !isalpha(*val)) { | 		if (!isalpha(*val) && !isdigit(*val) && !strchr(valid_uri_marks, *val)) { | ||||||
| 			ast_log(LOG_ERROR, "Error configuring endpoint '%s' - '%s' field " | 			ast_log(LOG_ERROR, "Error configuring endpoint '%s' - '%s' field " | ||||||
| 			"contains invalid character '%c'\n", | 			"contains invalid character '%c'\n", | ||||||
| 			ast_sorcery_object_get_id(endpoint), var->name, *val); | 			ast_sorcery_object_get_id(endpoint), var->name, *val); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user