webfinger: allow resolution of usernames with dots in them (internal actors)
This commit is contained in:
		
							parent
							
								
									a9d6a12bb3
								
							
						
					
					
						commit
						0a6f6e1b5b
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -32,7 +32,7 @@ def host_meta do
 | 
			
		|||
 | 
			
		||||
  def webfinger(resource, fmt) when fmt in ["XML", "JSON"] do
 | 
			
		||||
    host = Pleroma.Web.Endpoint.host()
 | 
			
		||||
    regex = ~r/(acct:)?(?<username>\w+)@#{host}/
 | 
			
		||||
    regex = ~r/(acct:)?(?<username>[a-z0-9A-Z_\.-]+)@#{host}/
 | 
			
		||||
 | 
			
		||||
    with %{"username" => username} <- Regex.named_captures(regex, resource),
 | 
			
		||||
         %User{} = user <- User.get_cached_by_nickname(username) do
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue