Skip to content

Commit 6f1e231

Browse files
Release OpenProject 11.3.4
2 parents 4d9a133 + 3b5e378 commit 6f1e231

File tree

10 files changed

+81
-21
lines changed

10 files changed

+81
-21
lines changed

.pkgr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ installer: https://github.com/pkgr/installer.git
3939
wizards:
4040
- https://github.com/pkgr/addon-legacy-installer.git
4141
- ./packaging/addons/openproject-edition
42-
- https://github.com/pkgr/addon-postgres
42+
- https://github.com/opf/addon-postgres
4343
- https://github.com/pkgr/addon-apache2.git
4444
- ./packaging/addons/repositories
4545
- https://github.com/pkgr/addon-smtp.git

app/services/service_result.rb

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,13 @@ def message
180180
private
181181

182182
def initialize_errors(errors)
183-
self.errors =
184-
if errors
185-
errors
186-
elsif result.respond_to?(:errors)
187-
result.errors
188-
else
189-
ActiveModel::Errors.new(self)
190-
end
183+
self.errors = errors || new_errors_with_result
184+
end
185+
186+
def new_errors_with_result
187+
ActiveModel::Errors.new(self).tap do |errors|
188+
errors.merge!(result) if result.try(:errors).present?
189+
end
191190
end
192191

193192
def get_message_type

docs/release-notes/11-3-3/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,24 @@ Release date: 2021-07-20
1313
We released [OpenProject 11.3.3](https://community.openproject.com/versions/1484).
1414
The release contains several bug fixes and we recommend updating to the newest version.
1515

16+
### Security issues
17+
18+
**CVE-2021-32763**: Regular Expression Denial of Service in OpenProject forum messages
19+
20+
An unoptimized regular expression in the quote functionality of the OpenProject forum feature in versions before 11.3.3 allows an attacker to perform a denial of service attack by passing a particularly crafted string to increase the runtime of the regular expression evaluation drastically.
21+
22+
Please see the advisory for [CVE-2021-32763](https://github.com/opf/openproject/security/advisories/GHSA-qqvp-j6gm-q56f) for more information.
23+
24+
**CVE-2021-36390**: Host Header Injection in unproxied Docker installations
25+
26+
The default ServerName configuration of the all-in-one and docker-compose based Docker containers of OpenProject allow for HOST header injection if they are operated without a proxying web server / load balancer in front of it with a proper ServerName setup.
27+
28+
Operating public facing docker containers is not recommended by OpenProject. The embedded server of the docker containers are not designed to be publicly accessible. Instead, use a proxying or load balancing web server that is bound to your public hostname. If you are using such an external web server, this advisory does not affect you.
29+
30+
Please see the advisory for [CVE-2021-36390](https://github.com/opf/openproject/security/advisories/GHSA-r8f8-pgg2-2c26) for more information.
31+
32+
33+
1634
<!--more-->
1735
#### Bug fixes and changes
1836

docs/release-notes/11-3-4/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: OpenProject 11.3.4
3+
sidebar_navigation:
4+
title: 11.3.4
5+
release_version: 11.3.4
6+
release_date: 2021-07-29
7+
---
8+
9+
# OpenProject 11.3.4
10+
11+
Release date: 2021-07-29
12+
13+
We released [OpenProject 11.3.4](https://community.openproject.com/versions/1488).
14+
The release contains several bug fixes and we recommend updating to the newest version.
15+
16+
<!--more-->
17+
#### Bug fixes and changes
18+

docs/release-notes/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ Stay up to date and get an overview of the new features included in the releases
1212
<!--- New release notes are generated below. Do not remove comment. -->
1313
<!--- RELEASE MARKER -->
1414

15+
## 11.3.4
16+
17+
Release date: 2021-07-29
18+
19+
[Release Notes](11-3-4/)
20+
21+
1522
## 11.3.3
1623

1724
Release date: 2021-07-20

lib/open_project/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module OpenProject
3535
module VERSION #:nodoc:
3636
MAJOR = 11
3737
MINOR = 3
38-
PATCH = 3
38+
PATCH = 4
3939
TINY = PATCH # Redmine compat
4040

4141
class << self

spec/lib/journal_formatter/custom_field_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
let(:expected) do
7171
I18n.t(:text_journal_changed,
7272
label: "<strong>#{custom_field.name}</strong>",
73+
linebreak: '',
7374
old: "<i title=\"#{old_formatted_value}\">#{old_formatted_value}</i>",
7475
new: "<i title=\"#{new_formatted_value}\">#{new_formatted_value}</i>")
7576
end
@@ -111,6 +112,7 @@
111112
I18n.t(:text_journal_changed_plain,
112113
label: custom_field.name,
113114
old: format_value(values.first, custom_field),
115+
linebreak: '',
114116
new: format_value(values.last, custom_field))
115117
end
116118

@@ -152,6 +154,7 @@
152154
let(:expected) do
153155
I18n.t(:text_journal_changed,
154156
label: "<strong>#{I18n.t(:label_deleted_custom_field)}</strong>",
157+
linebreak: '',
155158
old: "<i title=\"#{values.first}\">#{values.first}</i>",
156159
new: "<i title=\"#{values.last}\">#{values.last}</i>")
157160
end
@@ -229,6 +232,7 @@
229232
let(:expected) do
230233
I18n.t(:text_journal_changed,
231234
label: "<strong>#{custom_field.name}</strong>",
235+
linebreak: '',
232236
old: "<i title=\"cf 1, cf 2\">cf 1, cf 2</i>",
233237
new: "<i title=\"cf 3, cf 4\">cf 3, cf 4</i>")
234238
end
@@ -243,6 +247,7 @@
243247
let(:expected) do
244248
I18n.t(:text_journal_changed,
245249
label: "<strong>#{custom_field.name}</strong>",
250+
linebreak: '',
246251
old: "<i title=\"cf 1, cf 2\">cf 1, cf 2</i>",
247252
new: "<i title=\"(deleted option), cf 4\">(deleted option), cf 4</i>")
248253
end

spec/services/base_services/behaves_like_delete_service.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
let(:model_destroy_result) { true }
6262
let(:contract_validate_result) { true }
63-
let(:contract_errors) { double(ActiveModel::Errors) }
63+
let(:contract_errors) { ActiveModel::Errors.new(instance) }
6464

6565
before do
6666
allow(model_instance).to receive(:destroy).and_return(model_destroy_result)
@@ -99,19 +99,22 @@
9999

100100
context 'when model cannot be destroyed' do
101101
let(:model_destroy_result) { false }
102-
let(:model_errors) { instance_double(ActiveModel::Errors) }
102+
let(:model_errors) { ActiveModel::Errors.new(model_instance) }
103103

104104
it 'is unsuccessful' do
105105
expect(subject)
106106
.to be_failure
107107
end
108108

109109
it "returns the user's errors" do
110+
model_errors.add :base, 'This is some error.'
111+
110112
allow(model_instance)
111113
.to(receive(:errors))
112114
.and_return model_errors
113115

114116
expect(subject.errors).to eql model_errors
117+
expect(subject.errors[:base]).to include "This is some error."
115118
end
116119
end
117120
end

spec/services/service_result_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@
8282
it 'is an empty ActiveModel::Errors by default' do
8383
expect(instance.errors).to be_a ActiveModel::Errors
8484
end
85+
86+
context 'providing errors from user' do
87+
let(:result) { FactoryBot.build :work_package }
88+
89+
it 'creates a new errors instance' do
90+
instance = ServiceResult.new result: result
91+
expect(instance.errors).not_to eq result.errors
92+
end
93+
end
8594
end
8695

8796
describe 'result' do

spec/services/work_packages/update_service_spec.rb

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,9 @@
117117
end
118118

119119
context 'when setting the attributes is unsuccessful (invalid)' do
120-
let(:errors) { double('set errors', empty?: false) }
120+
let(:errors) { ActiveModel::Errors.new(work_package) }
121121
let(:set_service_results) { ServiceResult.new success: false, errors: errors, result: work_package }
122122

123-
before do
124-
allow(errors).to receive(:merge!)
125-
end
126-
127123
it 'is unsuccessful' do
128124
expect(subject.success?).to be_falsey
129125
end
@@ -135,18 +131,20 @@
135131
end
136132

137133
it 'exposes the errors' do
134+
errors.add(:base, 'This is a custom error!')
135+
138136
subject
139137

140138
expect(subject.errors).to eql errors
139+
expect(subject.errors[:base]).to include 'This is a custom error!'
141140
end
142141
end
143142

144143
context 'when the saving is unsuccessful' do
145144
let(:work_package_save_result) { false }
146-
let(:saving_errors) { double('saving_errors', empty?: false) }
145+
let(:saving_errors) { ActiveModel::Errors.new(work_package) }
147146

148147
before do
149-
allow(saving_errors).to receive(:merge!)
150148
allow(work_package)
151149
.to receive(:errors)
152150
.and_return(saving_errors)
@@ -162,10 +160,13 @@
162160
expect(work_package.changed?).to be_truthy
163161
end
164162

165-
it "exposes the work_packages's errors" do
163+
it 'exposes the errors, but is a new instance' do
164+
saving_errors.add(:base, 'This is a custom error!')
165+
166166
subject
167167

168-
expect(subject.errors).to eql saving_errors
168+
expect(subject.errors).not_to eql saving_errors
169+
expect(subject.errors[:base]).to include 'This is a custom error!'
169170
end
170171
end
171172
end

0 commit comments

Comments
 (0)