Commit graph

385 commits

Author SHA1 Message Date
Benjamin Neff
5bcf812646
Bump rspec 2023-06-11 17:25:45 +02:00
Benjamin Neff
35671e206c
Bump rubocop and rubocop-rails 2023-06-11 16:47:34 +02:00
Benjamin Neff
7b03c436d9
Bump fabrication 2023-06-11 16:47:33 +02:00
Benjamin Neff
525c43e67a
Don't follow redirects when federating messages
Federating uses POST requests, which don't work for redirects (unless
used with 307/308, but almost nobody uses these), so this was basically
broken anyway. The idea behind this was to follow http -> https
redirects, but as all pods nowadays have https already anyway, and
webfinger already enforces https, there is no need to follow redirects
anymore.
2022-12-05 04:52:14 +01:00
Benjamin Neff
8a8678c97b
Disable forgery protection for ReceiveController
This is enabled by default since rails 5.2, but it doesn't make sense
for the /receive/ routes, because they are called without a session and
without a token.
2022-07-23 02:15:53 +02:00
Benjamin Neff
f184ec5818
Drop json-schema-rspec and bump json-schema 2022-07-18 02:29:21 +02:00
Benjamin Neff
310d4a919b
Bump pronto-rubocop, rubocop and rubocop-rails 2022-07-18 02:29:21 +02:00
Benjamin Neff
bb12f93bd0
Add faraday 2 support 2022-07-18 02:29:21 +02:00
Benjamin Neff
500310c555
Merge pull request #122 from SuperTux88/cleanup-legacy-webfinger
Remove legacy WebFinger support/fallback
2022-03-13 21:40:36 +01:00
Benjamin Neff
6b8e8a70a0
Remove URL from hcard, it's not used anymore 2021-11-27 03:56:52 +01:00
Benjamin Neff
d5107f5678
Remove legacy Webfinger handling 2021-11-27 03:56:52 +01:00
Benjamin Neff
e8817d3082
Bump nokogiri 2021-11-26 02:59:31 +01:00
Benjamin Neff
9b563a6360
Bump rubocop
also apply new rules
2021-11-26 02:59:31 +01:00
Benjamin Neff
3861eb9fef
Merge branch '0.2.x' into develop 2021-10-24 21:14:25 +02:00
Benjamin Neff
d84d68d066
Validate that remote_photo_path on Photo entity is an URL with path
closes #119
2021-10-24 20:10:43 +02:00
Benjamin Neff
25b5b8d888
Add test for optional old_identity on AccountMigration 2021-10-24 20:08:04 +02:00
Benjamin Neff
0d12770262
Add remote_photo_path to AccountMigration entity
This can be set to the URL on the new pod when photos were
migrated/imported, so other pods can adjust the `remote_photo_path` of
the photos of the old account.
2021-10-24 20:08:04 +02:00
Benjamin Neff
85e12cea93
Only parse each nested element name once
A child elements should only appear once or it is part of a
nested array (photos, poll answers). So each element name only needs to
be parsed once, because the way `parse_array_from_node` works is, that
it already parses the full array with one call, so calling it multiple
times again parses the full array a second time.

closes #118
2021-10-24 19:57:48 +02:00
Benjamin Neff
162c2cf21b
Don't add author_signature if author also is parent author
This fully completes #64
2021-10-23 01:26:58 +02:00
Benjamin Neff
a1613577e8
Add ruby 2.7 and 3.0 2021-06-30 04:52:44 +02:00
Benjamin Neff
636cb9d2ba
Bump nokogiri 2021-06-30 04:00:28 +02:00
Benjamin Neff
cb138d6458
Bump rubocop, apply new cops and fix deprecations 2021-06-30 03:26:46 +02:00
Benjamin Neff
727ccaf71b
Delete legacy_helper.rb 2021-06-30 00:31:54 +02:00
Benjamin Neff
e9bf942618
Cleanup comment_integration_spec a little bit more 2021-06-30 00:11:09 +02:00
Benjamin Neff
3fcea8b188
Remove parent_author_signature from relayables
Closes #64
2019-10-30 17:49:46 +01:00
Benjamin Neff
1238fe0384
Remove old property-name mappings and cleanup xml_name functionality
Closes #29
2019-10-30 17:49:46 +01:00
Benjamin Neff
edfcc7886d
Remove old Request entity
Closes #32
2019-10-30 17:49:45 +01:00
Benjamin Neff
a082bcebff
Remove old SignedRetraction and RelayableRetraction
Closes #27
2019-10-30 17:49:45 +01:00
Benjamin Neff
0ccd15cd53
Remove legacy xml unwrap code
Closes #28
2019-10-30 17:49:45 +01:00
Benjamin Neff
0163963849
Remove old Slap and EncryptedSlap and cleanup legacy receive
Closes #30
2019-10-30 17:49:45 +01:00
Benjamin Neff
1570fff040
We can have indented heredoc now \o/ 2019-10-21 03:11:12 +02:00
Benjamin Neff
1dfe57ea7e
Add frozen_string_literal to all files
and remove redundant freezes
2019-10-21 03:11:12 +02:00
Benjamin Neff
4b4375cf78
Remove rails 4 support 2019-10-21 03:11:12 +02:00
Benjamin Neff
263b9dd946
Merge pull request #108 from SuperTux88/allow-web-diaspora-urls
Include web+ prefix in diaspora:// URL parsing
2018-10-05 21:46:44 +02:00
Benjamin Neff
d8a95cee69
Merge pull request #106 from SuperTux88/fix-fetching-with-dots-in-guids
Allow fetching of posts with dot in the GUID
2018-10-05 21:46:14 +02:00
Benjamin Neff
65905f7800
Include web+ prefix in diaspora:// URL parsing
This prevents creation of web+https://... URLs when replacing the
diaspora:// part.
2018-10-05 21:07:05 +02:00
Benjamin Neff
e0da26c7ee
Add "embed" entity
Fixes #93
2018-10-05 20:26:23 +02:00
Benjamin Neff
51647123f2
Allow fetching of posts with dot in the GUID 2018-10-05 00:57:11 +02:00
Benjamin Neff
b4add0dad5
Bump rails 2018-06-17 03:09:36 +02:00
Benjamin Neff
cce2c7fe31
Add full_name to profile
This is needed for diaspora/diaspora#3648
2018-04-09 00:58:20 +02:00
Benjamin Neff
0257ba7e59
Merge pull request #94 from SuperTux88/editable-entities
Editable entities
2018-02-17 21:50:05 +01:00
Benjamin Neff
b274cc3dad
Fix some validators for nil values
Using the real entities for the tests also uncovered some bugs where for
example empty strings are converted to nil and the validation wasn't
invalid in this case, but should be.
2018-02-14 01:50:39 +01:00
Benjamin Neff
32a49cc549
Get optional props from validated object
This is much easier and safer than "guessing" the class name based on
the validator name. That can cause a problem when another class with the
same name is found. The "guessing" was only added because we used
OpenStruct in the tests, but we shouldn't change the code only to make
tests run. I changed the tests to use the real entities, with
auto-validation disabled in the constructor, so we can test the
validator manually.
2018-02-14 01:37:20 +01:00
Benjamin Neff
392f1f5a18
Fix relayable signatures for messages with invalid XML characters
Sometimes messages contain characters that are invalid for XML, but they
are filteres out before creating the XML, otherwise the property would
be empty in the XML.

But for relayables the value is also used for creating the signatures,
so we need to filter the invalid characters earlier, before calculating
the signature.
2018-01-25 01:52:34 +01:00
Benjamin Neff
63f1cbd70a
Add edited_at property to event messages 2018-01-23 03:12:38 +01:00
Benjamin Neff
057ebd69f0
Add edited_at property to the profile message
This is needed so we can make sure to not overwrite newer data by older
one, for example when there are two edits close together and the newer
arrives faster.
2018-01-23 03:12:26 +01:00
Benjamin Neff
8563855be1
Add edited_at property to entities with a text property 2018-01-22 04:26:29 +01:00
Benjamin Neff
0ff382248a
Fix warning about shared example group 'a signable' been defined twice 2018-01-22 04:13:45 +01:00
Benjamin Neff
5e81760f30
Remove participants limit for conversations
The limit was added in 2012 to prevent spam, but since the participants
need to be a mutual contact with the author nowadays, I don't think it's
a spam problem anymore.

I also added a validation for the minimum count of the participants,
because a conversion without participants doesn't make much sense.
2018-01-18 02:50:04 +01:00
cmrd Senya
03d779ef39
Merge pull request #90 from SuperTux88/fix-booleans-for-relayables
Fix when booleans in relayables are false
2018-01-10 16:31:31 +02:00