The diaspora ID validator now validates if it is lowercase
Relaying relayables will fail with non-lowercase authors. closes #7625
This commit is contained in:
parent
84b89d5594
commit
3fafcd9307
3 changed files with 4 additions and 12 deletions
|
|
@ -30,6 +30,9 @@
|
|||
* Show users vote in polls [#7550](https://github.com/diaspora/diaspora/pull/7550)
|
||||
* Add explanation of ignore function to in-app help section [#7585](https://github.com/diaspora/diaspora/pull/7585)
|
||||
* Add camo information to NodeInfo [#7617](https://github.com/diaspora/diaspora/pull/7617)
|
||||
* Add support for `diaspora://` links [#7625](https://github.com/diaspora/diaspora/pull/7625)
|
||||
* Add support to relay likes for comments [#7625](https://github.com/diaspora/diaspora/pull/7625)
|
||||
* Implement RFC 7033 WebFinger [#7625](https://github.com/diaspora/diaspora/pull/7625)
|
||||
|
||||
# 0.7.0.1
|
||||
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ class PeopleController < ApplicationController
|
|||
end
|
||||
|
||||
def diaspora_id?(query)
|
||||
!(query.nil? || query.lstrip.empty?) && Validation::Rule::DiasporaId.new.valid_value?(query)
|
||||
!(query.nil? || query.lstrip.empty?) && Validation::Rule::DiasporaId.new.valid_value?(query.downcase).present?
|
||||
end
|
||||
|
||||
# view this profile on the home pod, if you don't want to sign in...
|
||||
|
|
|
|||
|
|
@ -625,17 +625,6 @@ describe Diaspora::Federation::Receive do
|
|||
|
||||
Diaspora::Federation::Receive.perform(status_message_entity)
|
||||
end
|
||||
|
||||
it "finds the correct author if the author is not lowercase" do
|
||||
status_message_entity = Fabricate(:status_message_entity, author: sender.diaspora_handle.upcase)
|
||||
|
||||
received = Diaspora::Federation::Receive.perform(status_message_entity)
|
||||
|
||||
status_message = StatusMessage.find_by!(guid: status_message_entity.guid)
|
||||
|
||||
expect(received).to eq(status_message)
|
||||
expect(status_message.author).to eq(sender)
|
||||
end
|
||||
end
|
||||
|
||||
context "with poll" do
|
||||
|
|
|
|||
Loading…
Reference in a new issue