Skip to content

Crash on tld validation when there is a colon before

Posting :test.test results in

Request: POST /api/v1/statuses
** (exit) an exception was raised:
    ** (MatchError) no match of right hand side value: nil                               
        (auto_linker) lib/auto_linker/parser.ex:341: AutoLinker.Parser.is_valid_tld?/2   
        (auto_linker) lib/auto_linker/parser.ex:263: AutoLinker.Parser.check_and_link/3  
        (auto_linker) lib/auto_linker/parser.ex:446: AutoLinker.Parser.run_handler/4     
        (auto_linker) lib/auto_linker/parser.ex:249: AutoLinker.Parser.do_parse/4        
        (auto_linker) lib/auto_linker/parser.ex:135: AutoLinker.Parser.do_parse/2        
        (pleroma) lib/pleroma/formatter.ex:78: Pleroma.Formatter.linkify/2               
        (pleroma) lib/pleroma/web/common_api/utils.ex:179: Pleroma.Web.CommonAPI.Utils.format_input/3
        (pleroma) lib/pleroma/web/common_api/utils.ex:126: Pleroma.Web.CommonAPI.Utils.make_content_html/4
Edited by rinpatch