diaspora_federation-rails 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f4f73ffc7a300a4018fbe2a188b15efc4edeb06
|
4
|
+
data.tar.gz: a1fc371461e657e2948fc2dee1ff41e31aaa6be7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfd9ac46edc802dbe29e1aa2ca0663568dcf4ecf00f370037369ff4212029877da021fbd8d9ace8f85999adee05da78ab14e745d46e8a54591007e7df2a2ead6
|
7
|
+
data.tar.gz: 509343f0961e487637535c99a2a8aff4b251a5daa249a726ff42782af5b26b073ecc5db3d5d35c00767fc4b64166c16f0048c3c458c2ed85924b405012b7160d
|
data/Changelog.md
CHANGED
@@ -1,3 +1,37 @@
|
|
1
|
+
# 0.2.0
|
2
|
+
|
3
|
+
## Features
|
4
|
+
|
5
|
+
* Add JSON support to entities [#52](https://github.com/diaspora/diaspora_federation/pull/52)
|
6
|
+
* Add `AccountMigration` entity [#54](https://github.com/diaspora/diaspora_federation/pull/54)
|
7
|
+
* Add `public` flag to `Profile` entity [#59](https://github.com/diaspora/diaspora_federation/pull/59)
|
8
|
+
* Allow to generate WebFinger with additional data [#61](https://github.com/diaspora/diaspora_federation/pull/61) [1b9dfc8](https://github.com/diaspora/diaspora_federation/commit/1b9dfc812e8b63c64a2d98db8999cae21d102c87)
|
9
|
+
* Provide RFC 7033 WebFinger [#63](https://github.com/diaspora/diaspora_federation/pull/63)
|
10
|
+
* Validate the author of the root post for a reshare [92ce4ea](https://github.com/diaspora/diaspora_federation/commit/92ce4eacf842f7a2fa74f298407062a4e0c891a3)
|
11
|
+
|
12
|
+
## Refactor
|
13
|
+
|
14
|
+
* Replace `factory_girl` with `fabrication` [184954e](https://github.com/diaspora/diaspora_federation/commit/184954e09ce72242cb7ec06c15fed0ad7b6c57c6)
|
15
|
+
* Use `actionpack` as dependency instead of `rails` (for `diaspora_federation-rails`) [f860a62](https://github.com/diaspora/diaspora_federation/commit/f860a62382999dcf0adaf41a24b50b74611f6ed9)
|
16
|
+
* Remove old backward-compatibility from WebFinger [#60](https://github.com/diaspora/diaspora_federation/pull/60)
|
17
|
+
* Make optional properties optional when generating WebFinger [#61](https://github.com/diaspora/diaspora_federation/pull/61) [5fef763](https://github.com/diaspora/diaspora_federation/commit/5fef7633c3aaf47db2592749e506f40b581c0371)
|
18
|
+
* Make `Message` entity non-relayable (see [#36](https://github.com/diaspora/diaspora_federation/issues/36)) [#62](https://github.com/diaspora/diaspora_federation/pull/62) [b7167b9](https://github.com/diaspora/diaspora_federation/commit/b7167b9fde4d614fb8f7510720918e029d3624f4)
|
19
|
+
* Make `Participation` entity non-relayable (see [#35](https://github.com/diaspora/diaspora_federation/issues/35)) [#62](https://github.com/diaspora/diaspora_federation/pull/62) [41ebe13](https://github.com/diaspora/diaspora_federation/commit/41ebe13126a28b95dbe5acc5db3939ee9dae7e4b)
|
20
|
+
* Remove legacy signature order and order by property order in entity (see [#26](https://github.com/diaspora/diaspora_federation/issues/26)) [#62](https://github.com/diaspora/diaspora_federation/pull/62) [87033e4](https://github.com/diaspora/diaspora_federation/commit/87033e4cd63f7d237b9d02d95b739e971d205ea1)
|
21
|
+
* Send new property names in XML (see [#29](https://github.com/diaspora/diaspora_federation/issues/29)) [#62](https://github.com/diaspora/diaspora_federation/pull/62) [52a8c89](https://github.com/diaspora/diaspora_federation/commit/52a8c89d4c0f1f66b188ab4a2ac36ffafb0bfa1a)
|
22
|
+
* Send unwrapped entities (see [#28](https://github.com/diaspora/diaspora_federation/issues/28)) [#62](https://github.com/diaspora/diaspora_federation/pull/62) [221d87d](https://github.com/diaspora/diaspora_federation/commit/221d87d7fe664bde8718182178cb31ba532977c6)
|
23
|
+
* Send the raw magic envelope and new encrypted magic envelope with crypt-json-wrapper (see [#30](https://github.com/diaspora/diaspora_federation/issues/30)) [#62](https://github.com/diaspora/diaspora_federation/pull/62) [1f99518](https://github.com/diaspora/diaspora_federation/commit/1f99518706e6bef3dca51453bf571373cd389942) [e5b2ef7](https://github.com/diaspora/diaspora_federation/commit/e5b2ef71e8cfa299874e3f80175526b8999839f7)
|
24
|
+
* Remove sign-code and prevent creation of `SignedRetraction` and `RelayableRetraction` (see [#27](https://github.com/diaspora/diaspora_federation/issues/27)) [#62](https://github.com/diaspora/diaspora_federation/pull/62) [cd3a7ab](https://github.com/diaspora/diaspora_federation/commit/cd3a7abf4d778f7e3139bcb73a42a9dc4cbcb835)
|
25
|
+
* Rename `xml_order` to `signature_order` on relayables [b510ed8](https://github.com/diaspora/diaspora_federation/commit/b510ed868f12e15fd5c7b91909cc35281efeb10e)
|
26
|
+
* Prevent creation of `Request` entity (see [#32](https://github.com/diaspora/diaspora_federation/issues/32)) [#62](https://github.com/diaspora/diaspora_federation/pull/62) [deed1c3](https://github.com/diaspora/diaspora_federation/commit/deed1c3f3ea76658074a4e34f534a12f083e8622)
|
27
|
+
* Don't check `parent_author_signature` and don't check the `author_signature` when the author is the parent author for relayables (see [#64](https://github.com/diaspora/diaspora_federation/issues/64)) [#65](https://github.com/diaspora/diaspora_federation/pull/65) [6817579](https://github.com/diaspora/diaspora_federation/commit/681757907204885735bc60b18929938ec2ad04bb) [57edc8b](https://github.com/diaspora/diaspora_federation/commit/57edc8baabcf884b0ac5395266ffe148cff5da1d)
|
28
|
+
* Add `created_at` to `Comment` entity [#67](https://github.com/diaspora/diaspora_federation/pull/67)
|
29
|
+
* Improve logging when validation fails [c0ea38d](https://github.com/diaspora/diaspora_federation/commit/c0ea38d258ccd76a7499bff0197434d8e42768e8)
|
30
|
+
|
31
|
+
## Bug fixes
|
32
|
+
|
33
|
+
* Fix issues when used without rails [ed2c2b7](https://github.com/diaspora/diaspora_federation/commit/ed2c2b7f47b91c308321076344459aee839318a8) [b25e229](https://github.com/diaspora/diaspora_federation/commit/b25e2293b0b83bc083bccdbf1523ee691dbb7b2e) [6615233](https://github.com/diaspora/diaspora_federation/commit/66152337f2b47c1cf6639646f55d21f69fe99708)
|
34
|
+
|
1
35
|
# 0.1.9
|
2
36
|
|
3
37
|
## Bug fixes
|
@@ -8,7 +8,8 @@ module DiasporaFederation
|
|
8
8
|
# example:
|
9
9
|
# <?xml version="1.0" encoding="UTF-8"?>
|
10
10
|
# <XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
|
11
|
-
# <Link rel="lrdd" type="application/xrd+xml"
|
11
|
+
# <Link rel="lrdd" type="application/xrd+xml"
|
12
|
+
# template="https://server.example/.well-known/webfinger.xml?resource={uri}"/>
|
12
13
|
# </XRD>
|
13
14
|
#
|
14
15
|
# GET /.well-known/host-meta
|
@@ -16,9 +17,47 @@ module DiasporaFederation
|
|
16
17
|
render xml: WebfingerController.host_meta_xml, content_type: "application/xrd+xml"
|
17
18
|
end
|
18
19
|
|
19
|
-
#
|
20
|
+
# Returns the webfinger as RFC 7033 JRD or XRD.
|
20
21
|
#
|
21
|
-
# example:
|
22
|
+
# JSON example:
|
23
|
+
# {
|
24
|
+
# "subject": "acct:alice@localhost:3000",
|
25
|
+
# "aliases": [
|
26
|
+
# "http://localhost:3000/people/c8e87290f6a20132963908fbffceb188"
|
27
|
+
# ],
|
28
|
+
# "links": [
|
29
|
+
# {
|
30
|
+
# "rel": "http://microformats.org/profile/hcard",
|
31
|
+
# "type": "text/html",
|
32
|
+
# "href": "http://localhost:3000/hcard/users/c8e87290f6a20132963908fbffceb188"
|
33
|
+
# },
|
34
|
+
# {
|
35
|
+
# "rel": "http://joindiaspora.com/seed_location",
|
36
|
+
# "type": "text/html",
|
37
|
+
# "href": "http://localhost:3000/"
|
38
|
+
# },
|
39
|
+
# {
|
40
|
+
# "rel": "http://webfinger.net/rel/profile-page",
|
41
|
+
# "type": "text/html",
|
42
|
+
# "href": "http://localhost:3000/u/alice"
|
43
|
+
# },
|
44
|
+
# {
|
45
|
+
# "rel": "http://schemas.google.com/g/2010#updates-from",
|
46
|
+
# "type": "application/atom+xml",
|
47
|
+
# "href": "http://localhost:3000/public/alice.atom"
|
48
|
+
# },
|
49
|
+
# {
|
50
|
+
# "rel": "salmon",
|
51
|
+
# "href": "http://localhost:3000/receive/users/c8e87290f6a20132963908fbffceb188"
|
52
|
+
# },
|
53
|
+
# {
|
54
|
+
# "rel": "http://ostatus.org/schema/1.0/subscribe",
|
55
|
+
# "template": "http://localhost:3000/people?q={uri}"
|
56
|
+
# }
|
57
|
+
# ]
|
58
|
+
# }
|
59
|
+
#
|
60
|
+
# XML example:
|
22
61
|
# <?xml version="1.0" encoding="UTF-8"?>
|
23
62
|
# <XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
|
24
63
|
# <Subject>acct:alice@localhost:3000</Subject>
|
@@ -26,22 +65,30 @@ module DiasporaFederation
|
|
26
65
|
# <Link rel="http://microformats.org/profile/hcard" type="text/html"
|
27
66
|
# href="http://localhost:3000/hcard/users/c8e87290f6a20132963908fbffceb188"/>
|
28
67
|
# <Link rel="http://joindiaspora.com/seed_location" type="text/html" href="http://localhost:3000/"/>
|
29
|
-
# <Link rel="http://joindiaspora.com/guid" type="text/html" href="c8e87290f6a20132963908fbffceb188"/>
|
30
68
|
# <Link rel="http://webfinger.net/rel/profile-page" type="text/html" href="http://localhost:3000/u/alice"/>
|
31
69
|
# <Link rel="http://schemas.google.com/g/2010#updates-from" type="application/atom+xml"
|
32
70
|
# href="http://localhost:3000/public/alice.atom"/>
|
33
71
|
# <Link rel="salmon" href="http://localhost:3000/receive/users/c8e87290f6a20132963908fbffceb188"/>
|
34
|
-
# <Link rel="diaspora-public-key" type="RSA" href="LS0tLS1CRU......"/>
|
35
72
|
# </XRD>
|
36
|
-
#
|
37
|
-
|
38
|
-
|
73
|
+
#
|
74
|
+
# GET /.well-known/webfinger?resource=<uri>
|
75
|
+
def webfinger
|
76
|
+
person_wf = find_person_webfinger(params.require(:resource))
|
39
77
|
|
40
78
|
if person_wf.nil?
|
41
79
|
head :not_found
|
42
80
|
else
|
43
81
|
logger.info "webfinger profile request for: #{person_wf.acct_uri}"
|
44
|
-
|
82
|
+
|
83
|
+
respond_to do |format|
|
84
|
+
format.any(:jrd, :json, :html) do
|
85
|
+
headers["Access-Control-Allow-Origin"] = "*"
|
86
|
+
render json: JSON.pretty_generate(person_wf.to_json), content_type: "application/jrd+json"
|
87
|
+
end
|
88
|
+
format.any(:xrd, :xml) do
|
89
|
+
render xml: person_wf.to_xml, content_type: "application/xrd+xml"
|
90
|
+
end
|
91
|
+
end
|
45
92
|
end
|
46
93
|
end
|
47
94
|
|
@@ -1,2 +1,2 @@
|
|
1
1
|
# Don't log received xml data.
|
2
|
-
Rails.application.config.filter_parameters += %i
|
2
|
+
Rails.application.config.filter_parameters += %i[xml aes_key encrypted_magic_envelope]
|
data/config/routes.rb
CHANGED
@@ -9,8 +9,8 @@ DiasporaFederation::Engine.routes.draw do
|
|
9
9
|
end
|
10
10
|
|
11
11
|
controller :webfinger do
|
12
|
-
get ".well-known/host-meta" => :host_meta,
|
13
|
-
get "webfinger"
|
12
|
+
get ".well-known/host-meta" => :host_meta, :as => "host_meta"
|
13
|
+
get ".well-known/webfinger" => :webfinger, :as => "webfinger"
|
14
14
|
end
|
15
15
|
|
16
16
|
controller :h_card do
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: diaspora_federation-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Neff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: actionpack
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -36,14 +36,14 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - '='
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 0.
|
39
|
+
version: 0.2.0
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - '='
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.
|
46
|
+
version: 0.2.0
|
47
47
|
description: A rails engine that adds the diaspora* federation protocol to a rails
|
48
48
|
app
|
49
49
|
email:
|
@@ -61,6 +61,7 @@ files:
|
|
61
61
|
- app/controllers/diaspora_federation/receive_controller.rb
|
62
62
|
- app/controllers/diaspora_federation/webfinger_controller.rb
|
63
63
|
- config/initializers/filter_parameter_logging.rb
|
64
|
+
- config/initializers/mime_types.rb
|
64
65
|
- config/routes.rb
|
65
66
|
- lib/diaspora_federation/engine.rb
|
66
67
|
- lib/diaspora_federation/rails.rb
|