Unable to post email address

It’s not possible to post an email address anymore. The following produces an Error 500:

  • [foo@example.com](http://foo@example.com)
  • [email]bar@example.com[/email]

This seems to be related to PR 4138.

parsed.path seems to be nil for email addresses. Does it even make sense to parse URIs with a scheme other than http and https?

3 Likes

Nahh not that, its a regression in extract links

NoMethodError (undefined method `slice!' for nil:NilClass)

/var/www/discourse/app/models/topic_link.rb:129:in `block (2 levels) in extract_from'
/var/www/discourse/app/models/topic_link.rb:116:in `each'
/var/www/discourse/app/models/topic_link.rb:116:in `block in extract_from'
/var/www/discourse/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.6/lib/active_record/transactions.rb:220:in `transaction'
/var/www/discourse/app/models/topic_link.rb:106:in `extract_from'
/var/www/discourse/lib/post_creator.rb:385:in `extract_links'

I think @eviltrout fixed some bugs there recently … not sure.

1 Like

Actually, I might have introduced that bug. Having a look.

3 Likes

@gerhard was right after all :wink:

https://github.com/discourse/discourse/commit/f38289795250f84fb2cb7e81ed0037780c08f7fc

4 Likes