From: codl Date: Sat, 22 Apr 2017 13:08:30 +0000 (+0200) Subject: strip leading & trailing spaces from remote follow acct (#997) (#2321) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=8565ba68f7a6e4342cd4a63833b4d0ff743f0235;p=mastodon.git strip leading & trailing spaces from remote follow acct (#997) (#2321) --- diff --git a/app/models/remote_follow.rb b/app/models/remote_follow.rb index 13281a4fc..6c291e22c 100644 --- a/app/models/remote_follow.rb +++ b/app/models/remote_follow.rb @@ -8,6 +8,6 @@ class RemoteFollow validates :acct, presence: true def initialize(attrs = {}) - @acct = attrs[:acct] + @acct = attrs[:acct].strip unless attrs[:acct].nil? end end