Fix unicode character handling in command arguments
Many thanks to Krzysztof Grochocki for finding this fix. This fixes issue #153.
This commit is contained in:
		
							parent
							
								
									32fd4c4d9c
								
							
						
					
					
						commit
						7f75aa0372
					
				| @ -87,7 +87,7 @@ maybe_post_request(<<$<,_/binary>> = Data, Host, ClientIp) -> | |||||||
|     end;     |     end;     | ||||||
| maybe_post_request(Data, Host, _ClientIp) -> | maybe_post_request(Data, Host, _ClientIp) -> | ||||||
|     ?INFO_MSG("Data: ~p", [Data]), |     ?INFO_MSG("Data: ~p", [Data]), | ||||||
|     Args = split_line(binary_to_list(Data)), |     Args = split_line(unicode:characters_to_list(Data, utf8)), | ||||||
|     AccessCommands = get_option_access(Host), |     AccessCommands = get_option_access(Host), | ||||||
|     case ejabberd_ctl:process2(Args, AccessCommands) of |     case ejabberd_ctl:process2(Args, AccessCommands) of | ||||||
| 	{"", ?STATUS_SUCCESS} -> | 	{"", ?STATUS_SUCCESS} -> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user