Commit 3fafcd93 authored by Benjamin Neff's avatar Benjamin Neff

The diaspora ID validator now validates if it is lowercase

Relaying relayables will fail with non-lowercase authors.

closes #7625
parent 84b89d55
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment