Compare commits

..

17 Commits

Author SHA1 Message Date
Dennis Schubert
49f3442f64 Merge branch 'next-minor' into develop 2025-06-22 14:41:04 +02:00
Dennis Schubert
aadd8396cc Update open_graph_reader to 0.9.1 and set new config flag.
closes #8465
2025-06-22 14:40:56 +02:00
Dennis Schubert
251e4329c5 Merge branch 'next-minor' into develop 2025-04-13 18:09:23 +02:00
flaburgan
452f46a548 Add reported user diaspora ID in /report view
closes #8464
2025-04-13 18:09:15 +02:00
Dennis Schubert
c2589f10cc Merge branch 'next-minor' into develop 2025-01-23 22:21:26 +01:00
Dennis Schubert
c24ca7d56c Update open_graph_reader to 0.8.0
closes #8463
2025-01-23 22:21:21 +01:00
Benjamin Neff
e569ec72c7 Merge branch 'next-minor' into develop 2025-01-23 01:36:16 +01:00
flaburgan
d26b917e6f Update diaspora.toml.example
closes #8462
2025-01-23 01:36:10 +01:00
Benjamin Neff
0ea682b1d5 Merge branch 'next-minor' into develop 2025-01-11 00:48:59 +01:00
Benjamin Neff
3fcd5708e9 Revert "Start 1.0.0 cycle (again)" on next-minor
This reverts commit 094cb73b05.
2025-01-11 00:47:25 +01:00
Dennis Schubert
b9c36fadfd Add Changelog entry for #8460...
Nobody saw anything! This commit does not exist!
2025-01-10 23:31:53 +01:00
Dennis Schubert
150331ec9d Merge pull request #8460 from denschub/bump-imagemagick-disk-limit 2025-01-10 23:28:32 +01:00
Dennis Schubert
eede6e0f68 Allow ImageMagick to use 1GiB of disk caches
This matches the "websafe" upstream preset[0], and our current limit is too low for high-noise images (like a scene full of snow).

[0]: c7d070ec65/config/policy-websafe.xml (L58)
2025-01-10 23:07:21 +01:00
Benjamin Neff
37096d9c88 Merge branch 'next-minor' into develop 2024-09-05 01:39:56 +02:00
Daniel Black
53b9e3cbf3 docker-compose.yml - bump mariadb version
Noted its not the primary development environment, but 10.9 is out of support so just keep the the LTS tag.

MARIADB_AUTO_UPGRADE=1 facilitates in place upgrades.

closes #8452
2024-09-05 01:39:30 +02:00
Benjamin Neff
094cb73b05 Start 1.0.0 cycle (again) 2024-06-16 02:37:05 +02:00
Benjamin Neff
83a97420d9 Start 0.9.1.0 cycle 2024-06-16 02:35:30 +02:00
14 changed files with 62 additions and 31 deletions

View File

@@ -1,3 +1,23 @@
# 1.0.0 (unreleased)
## Refactor
## Bug fixes
## Features
# 0.9.1.0 (unreleased)
## Refactor
* Improved compatibility with non-specification-compliant OpenGraph metadata [#8465](https://github.com/diaspora/diaspora/pull/8465)
## Bug fixes
* Fix processing for a specific set of uploaded images, like scenes full of snow, by allowing for a larger on-disk cache for ImageMagick [#8460](https://github.com/diaspora/diaspora/pull/8460)
* Fix a bug with parsing certain OpenGraph metadata structures [#8463](https://github.com/diaspora/diaspora/pull/8463)
## Features
* For admins, the offending content's author is now visible in the reports overview [#8464](https://github.com/diaspora/diaspora/pull/8464)
# 0.9.0.0
## New configuration file!

View File

@@ -110,7 +110,7 @@ gem "leaflet-rails", "1.9.4"
# Parsing
gem "nokogiri", "1.16.5"
gem "open_graph_reader", "0.7.2" # also update User-Agent in features/support/webmock.rb and open_graph_cache_spec.rb
gem "open_graph_reader", "0.9.1" # also update User-Agent in features/support/webmock.rb and open_graph_cache_spec.rb
gem "redcarpet", "3.6.0"
gem "ruby-oembed", "0.17.0"
gem "twitter-text", "3.1.0"

View File

@@ -229,7 +229,7 @@ GEM
http-cookie (~> 1.0.0)
faraday-follow_redirects (0.3.0)
faraday (>= 1, < 3)
faraday-net_http (3.1.0)
faraday-net_http (3.1.1)
net-http
faraday-retry (2.2.1)
faraday (~> 2.0)
@@ -390,7 +390,7 @@ GEM
mime-types-data (3.2024.0507)
mini_magick (4.12.0)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
mini_portile2 (2.8.9)
minitest (5.23.1)
mobile-fu (1.4.0)
rack-mobile-detect
@@ -402,7 +402,7 @@ GEM
multipart-post (2.4.1)
mysql2 (0.5.6)
naught (1.1.0)
net-http (0.4.1)
net-http (0.6.0)
uri
net-imap (0.4.12)
date
@@ -454,7 +454,7 @@ GEM
rack
omniauth-wordpress (0.2.2)
omniauth-oauth2 (>= 1.1.0)
open_graph_reader (0.7.2)
open_graph_reader (0.9.1)
faraday (>= 0.9.0)
nokogiri (~> 1.6)
openid_connect (2.3.0)
@@ -507,7 +507,7 @@ GEM
puma (6.4.2)
nio4r (~> 2.0)
raabro (1.4.0)
racc (1.8.0)
racc (1.8.1)
rack (2.2.9)
rack-attack (6.7.0)
rack (>= 1.0, < 4)
@@ -732,7 +732,7 @@ GEM
unf_ext
unf_ext (0.0.9.1)
unicode-display_width (2.5.0)
uri (0.13.0)
uri (1.0.3)
uuid (2.3.9)
macaddr (~> 1.0)
valid (1.2.0)
@@ -832,7 +832,7 @@ DEPENDENCIES
omniauth-tumblr (= 1.2)
omniauth-twitter (= 1.4.0)
omniauth-wordpress (= 0.2.2)
open_graph_reader (= 0.7.2)
open_graph_reader (= 0.9.1)
openid_connect (= 2.3.0)
pg (= 1.5.6)
pronto (= 0.11.2)

View File

@@ -21,6 +21,10 @@
= report.text
.panel-body
.content
%strong
= t("report.author_label")
%p
= report.reported_author.diaspora_handle
= report_content(report)
.segment-selection
= button_to t("report.reported_user_details"),

View File

@@ -4,7 +4,7 @@
defaults:
version:
number: "0.9.0.0" # Do not touch unless doing a release, do not backport the version number that's in master
number: "1.0.0-dev" # Do not touch unless doing a release, do not backport the version number that's in master
heroku: false
environment:
url: "http://localhost:3000/"

View File

@@ -48,7 +48,7 @@
## Require SSL (default=true).
## When set, your pod will force the use of HTTPS in production mode.
## Since OAuth2 requires SSL, Diaspora's future API might not work if
## Since OAuth2 requires SSL, Diaspora's API might not work if
## you're not using SSL. Also there is no guarantee that posting to
## services will be possible if SSL is disabled.
## Do not change this default unless you are sure!
@@ -308,7 +308,7 @@
## Changelog URL
## URL to the changelog of the diaspora-version your pod is currently running.
## If not set an auto-generated url to github is used.
#changelog_url = "https://github.com/diaspora/diaspora/blob/master/Changelog.md"
#changelog_url = "https://github.com/diaspora/diaspora/blob/main/Changelog.md"
## Default color theme
## You can change which color theme is displayed when a user is not signed in

View File

@@ -1,6 +1,6 @@
<policymap>
<policy domain="resource" name="time" value="30" />
<policy domain="resource" name="disk" value="256MiB"/>
<policy domain="resource" name="disk" value="1GiB"/>
<policy domain="resource" name="map" value="256MiB"/>
<policy domain="resource" name="memory" value="256MiB"/>

View File

@@ -1,11 +1,12 @@
# frozen_string_literal: true
OpenGraphReader.configure do |config|
config.synthesize_title = true
config.synthesize_url = true
config.synthesize_full_url = true
config.synthesize_image_url = true
config.guess_datetime_format = true
config.synthesize_title = true
config.synthesize_url = true
config.synthesize_full_url = true
config.synthesize_full_image_url = true
config.synthesize_image_content = true
config.guess_datetime_format = true
end
og_video_urls = []

View File

@@ -1049,8 +1049,9 @@ en:
placeholder: "This content violates the terms because..."
submit: "Report this content"
title: "Reports overview"
post_label: "<strong>Post</strong>: %{content}"
comment_label: "<strong>Comment</strong>: %{data}"
author_label: "Author:"
post_label: "<strong>Post</strong>:<br />%{content}"
comment_label: "<strong>Comment</strong>:<br />%{data}"
reported_label: "<strong>Reported by</strong> %{person}"
reason_label: "Reason:"
review_link: "Mark as reviewed"

View File

@@ -45,10 +45,11 @@ services:
POSTGRES_PASSWORD: postgres
mysql:
image: mariadb:10.9
image: mariadb:lts
ports:
- 53306:3306
volumes:
- mysql_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: mysql
MARIADB_ROOT_PASSWORD: mysql
MARIADB_AUTO_UPGRADE: 1

View File

@@ -23,7 +23,7 @@ Feature: reporting of posts and comments
And I submit the form
Then I should see an error flash message containing "The report already exists"
When I go to the report page
Then I should see a report by "alice@alice.alice" with reason "That's my reason" on post "I'm a post by Bob"
Then I should see a report by "alice@alice.alice" with reason "That's my reason" on post "I'm a post by Bob" by "bob@localhost"
And "alice@alice.alice" should have received an email with subject "A new post was marked as offensive"
Scenario: User can report a comment, but cannot report it twice
@@ -42,7 +42,7 @@ Feature: reporting of posts and comments
And I submit the form
Then I should see an error flash message containing "The report already exists"
When I go to the report page
Then I should see a report by "alice@alice.alice" with reason "That's my reason" on comment "Bob comment"
Then I should see a report by "alice@alice.alice" with reason "That's my reason" on comment "Bob comment" by "bob@localhost"
And "alice@alice.alice" should have received an email with subject "A new comment was marked as offensive"
Scenario: The correct post is reported

View File

@@ -8,16 +8,20 @@ And /^I should see the report modal/ do
step %(I should see "Reporting content" within "#reportModal")
end
And /^I should see a report by "([^"]*)" with reason "([^"]*)" on post "([^"]*)"$/ do |reporter, reason, content|
test_report("Post", User.find_by(email: reporter), reason, content)
And /^I should see a report by "([^"]*)" with reason "([^"]*)" on post "([^"]*)" by "([^"]*)"$/ do
|reporter, reason, content, author|
test_report("Post", User.find_by(email: reporter), reason, content, author)
end
And /^I should see a report by "([^"]*)" with reason "([^"]*)" on comment "([^"]*)"$/ do |reporter, reason, content|
test_report("Comment", User.find_by(email: reporter), reason, content)
And /^I should see a report by "([^"]*)" with reason "([^"]*)" on comment "([^"]*)" by "([^"]*)"$/ do
|reporter, reason, content, author|
test_report("Comment", User.find_by(email: reporter), reason, content, author)
end
def test_report(type, reporter, reason, content)
def test_report(type, reporter, reason, content, author)
step %(I should see "#{reporter.username}" within ".reporter")
step %(I should see "#{reason}" within ".reason")
step %(I should see "#{type}: #{content}" within ".content")
step %(I should see "#{author}:" within ".content")
step %(I should see "#{type}:" within ".content")
step %(I should see "#{content}" within ".content")
end

View File

@@ -7,7 +7,7 @@ Before do
stub_request(:head, /.+/).with(
headers: {
"Accept" => "text/html",
"User-Agent" => "OpenGraphReader/0.7.2 (+https://github.com/jhass/open_graph_reader)"
"User-Agent" => "OpenGraphReader/0.9.1 (+https://github.com/jhass/open_graph_reader)"
}
).to_return(status: 200, body: "", headers: {"Content-Type" => "text/plain"})
end

View File

@@ -63,7 +63,7 @@ describe OpenGraphCache, type: :model do
stub_request(:head, "http:///wetter.com")
.with(headers: {
"Accept" => "text/html",
"User-Agent" => "OpenGraphReader/0.7.2 (+https://github.com/jhass/open_graph_reader)"
"User-Agent" => "OpenGraphReader/0.9.1 (+https://github.com/jhass/open_graph_reader)"
})
.to_return(status: 200, body: "", headers:
{"Set-Cookie" => "Dabgroup=A;path=/;Expires=Thu, 23 May 2019 16:12:01 GMT;httpOnly"})