Skip to content

Commit 3aeec0b

Browse files
Release OpenProject 16.6.3
2 parents 9448e4d + 13ecb17 commit 3aeec0b

File tree

21 files changed

+237
-74
lines changed

21 files changed

+237
-74
lines changed

app/controllers/account_controller.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ def logout
9090
end
9191

9292
# Enable user to choose a new password
93-
def lost_password
94-
return redirect_to(home_url) unless allow_lost_password_recovery?
93+
def lost_password # rubocop:disable Metrics/AbcSize, Metrics/PerceivedComplexity
94+
return redirect_to(home_url, status: :see_other) unless allow_lost_password_recovery?
9595

9696
if params[:token]
9797
@token = ::Token::Recovery.find_by_plaintext_value(params[:token])
98-
redirect_to(home_url) && return unless @token and !@token.expired?
98+
redirect_to(home_url, status: :see_other) && return unless @token and !@token.expired?
9999

100100
@user = @token.user
101101
if request.post?
@@ -104,7 +104,7 @@ def lost_password
104104

105105
if call.success?
106106
@token.destroy
107-
redirect_to action: "login"
107+
redirect_to action: "login", status: :see_other
108108
return
109109
end
110110
end
@@ -121,13 +121,15 @@ def lost_password
121121
unless user
122122
# user not found in db
123123
Rails.logger.error "Lost password unknown email input: #{mail}"
124+
redirect_to action: :lost_password, status: :see_other
124125
return
125126
end
126127

127128
unless user.change_password_allowed?
128129
# user uses an external authentication
129130
UserMailer.password_change_not_possible(user).deliver_later
130131
Rails.logger.warn "Password cannot be changed for user: #{mail}"
132+
redirect_to action: :lost_password, status: :see_other
131133
return
132134
end
133135

@@ -136,7 +138,7 @@ def lost_password
136138
if token.save
137139
UserMailer.password_lost(token).deliver_later
138140
flash[:notice] = I18n.t(:notice_account_lost_email_sent)
139-
redirect_to action: "login", back_url: home_url
141+
redirect_to action: :lost_password, status: :see_other
140142
nil
141143
end
142144
end

app/models/work_packages/scopes/allowed_to.rb

Lines changed: 18 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -98,54 +98,34 @@ def logged_in_non_admin_allowed_to_large_instances(user, permissions)
9898
WHERE entity_id IS NULL
9999
SQL
100100

101-
# Remove those entries from before that are
102-
# * entity (WorkPackage) specific AND
103-
# * have the same project as a non-entity specific entry.
104-
# That is the case if a work package is shared with a user
105-
# while the user is already a member in the project.
106-
# Since the allowed_to filtering is already specific to the permissions, that removal is safe.
107-
entity_member_projects_without_duplicates = Arel.sql(<<~SQL.squish)
108-
SELECT * FROM entity_member_projects
109-
WHERE NOT EXISTS (
110-
SELECT 1 FROM project_member_projects
111-
WHERE project_member_projects.id = entity_member_projects.id
112-
)
113-
SQL
114-
115101
# Take all work packages allowed by either project-wide or entity-specific membership.
116-
# But now remove all those that are in a project for which an entity-specific membership exists that is not
117-
# for that entity (work package).
118-
# An alternative way of formulating this would be by comparing
119-
# * That the project_id matches AND
120-
# * the entity_id matches OR the entity_id is null
121-
# ```
122-
# SELECT * from work_packages
123-
# WHERE EXISTS (
124-
# SELECT 1 FROM allowed_projects projects
125-
# WHERE projects.id = work_packages.project_id
126-
# AND (projects.entity_id = work_packages.id OR projects.entity_id IS NULL)
127-
# )
128-
# ```
129-
# Postgresql however sometimes turns to a sequential scan with the query above.
102+
# PostgreSQL however sometimes turns to a sequential scan with the query above.
130103
#
131-
# Index scans can still happen in the combination of the CTE with the check outside of the
132-
# CTEs for the existence of any record.
133-
# This is particularly likely in case AR.exists? is used which adds a LIMIT 1
104+
# It is currently unclear if index scans can still happen in the combination of the CTE with the check
105+
# outside of the CTEs for the existence of any record.
106+
# This happened in the past, before changing this CTE to a UNION, in case AR.exists? is used which adds a LIMIT 1
134107
# to the query. In this case, there is a known shortcoming that PostgreSQL's query planner
135108
# will make poor choices
136109
# (https://www.postgresql.org/message-id/flat/CA%2BU5nMLbXfUT9cWDHJ3tpxjC3bTWqizBKqTwDgzebCB5bAGCgg%40mail.gmail.com).
137110
#
138111
# Once AR supports adding materialization hints (https://github.com/rails/rails/pull/54322), the inner
139112
# `allowed` CTE can be abandoned as it is only used for being able to provide such a hint.
113+
# Having the inner materialized CTE has no known negative side effects which is why it is kept.
140114
allowed_by_projects_and_work_packages = Arel.sql(<<~SQL.squish)
141115
WITH allowed AS MATERIALIZED (
142-
SELECT id from work_packages
143-
WHERE project_id in (SELECT id FROM member_projects)
144-
AND NOT EXISTS (
145-
SELECT 1 FROM entity_member_projects_without_duplicates
146-
WHERE entity_member_projects_without_duplicates.id = work_packages.project_id
147-
AND entity_member_projects_without_duplicates.entity_id != work_packages.id
148-
)
116+
SELECT
117+
work_packages.id
118+
FROM
119+
work_packages
120+
JOIN project_member_projects ON project_member_projects.id = work_packages.project_id
121+
122+
UNION
123+
124+
SELECT
125+
work_packages.id
126+
FROM
127+
work_packages
128+
JOIN entity_member_projects ON entity_member_projects.entity_id = work_packages.id
149129
)
150130
151131
SELECT * from allowed
@@ -154,7 +134,6 @@ def logged_in_non_admin_allowed_to_large_instances(user, permissions)
154134
with(member_projects: Arel.sql(allowed_via_project_or_work_package_membership.to_sql),
155135
entity_member_projects:,
156136
project_member_projects:,
157-
entity_member_projects_without_duplicates:,
158137
allowed_by_projects_and_work_packages:)
159138
.where(<<~SQL.squish)
160139
EXISTS (

docs/release-notes/16-6-2/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Below you will find a complete list of all changes and bug fixes.
2525
- Bugfix: OpenID Connect: Claims escaped twice \[[#69079](https://community.openproject.org/wp/69079)\]
2626
- Bugfix: Disable editing of sendmail attributes through UI \[[#69577](https://community.openproject.org/wp/69577)\]
2727

28+
2829
<!-- END AUTOMATED SECTION -->
2930
<!-- Warning: Anything above this line will be automatically removed by the release script -->
3031

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: OpenProject 16.6.3
3+
sidebar_navigation:
4+
title: 16.6.3
5+
release_version: 16.6.3
6+
release_date: 2025-12-11
7+
---
8+
9+
# OpenProject 16.6.3
10+
11+
Release date: 2025-12-11
12+
13+
We released OpenProject [OpenProject 16.6.3](https://community.openproject.org/versions/2247).
14+
The release contains several bug fixes and we recommend updating to the newest version.
15+
Below you will find a complete list of all changes and bug fixes.
16+
17+
<!--more-->
18+
19+
## Bug fixes and changes
20+
21+
<!-- Warning: Anything within the below lines will be automatically removed by the release script -->
22+
<!-- BEGIN AUTOMATED SECTION -->
23+
24+
- Bugfix: Shared WP inaccessible to non-project members (Error 404) #68852 \[[#68921](https://community.openproject.org/wp/68921)\]
25+
- Bugfix: User not fully deleted if that user created a recurring meeting \[[#69517](https://community.openproject.org/wp/69517)\]
26+
- Bugfix: No message when using &quot;forgot password&quot; with unknown email \[[#69730](https://community.openproject.org/wp/69730)\]
27+
28+
<!-- END AUTOMATED SECTION -->
29+
<!-- Warning: Anything above this line will be automatically removed by the release script -->

docs/release-notes/README.md

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

16+
## 16.6.3
17+
18+
Release date: 2025-12-11
19+
20+
[Release Notes](16-6-3/)
21+
22+
1623
## 16.6.2
1724

1825
Release date: 2025-12-02

docs/security-and-privacy/statement-on-security/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ You can also [report a vulnerability directly in GitHub](https://github.com/opf/
6262

6363
Please include a description on how to reproduce the issue if possible. Our security team will get your email and will attempt to reproduce and fix the issue as soon as possible.
6464

65-
> **Please note:** OpenProject currently does not offer a bug bounty program. We will do our best to give you the appropriate credits for responsibly disclosing a security vulnerability to us. We will gladly reference your work, name, website on every publication we do related to the security update.
65+
## Bug bounty program
66+
67+
OpenProject is currently subject of a bug bounty program, kindly sponsored by the European Commission. Please see https://yeswehack.com/programs/openproject for more details.
68+
69+
Please note that OpenProject does not offer its own bug bounty program. For any security vulnerability you responsibly disclose to it, whether it's through another bug bounty porgram or through our website, we will do our best to give you the appropriate credits for responsibly disclosing a security vulnerability to us. We will gladly reference your work, name, website on every publication we do related to the security update.
6670

6771
## OpenProject security features
6872

docs/use-cases/project-management-pm2-pmflex/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ This table provides an overview of the key terms and structures used to **map**
3838
| Project Roles | Project members with roles | [Members](https://pm2.openproject.com/projects/pm2-test/members) | [#31411](https://community.openproject.org/wp/31141) Add PM² roles and permissions to seed data |
3939
| [5 Initiating Phase](../../project-management-guide/5-initiating-phase) | | | |
4040
| Project Charter | Project Charter (work package type) | [Project Charter](https://pm2.openproject.com/projects/pm2-test/work_packages/451) | [#68064](https://community.openproject.org/wp/68064) Beyond documents for project artefacts |
41-
| Project Initiation Request | Project Initiation Request (work package type) | [Project Initiation Request](https://pm2.openproject.com/projects/pm2-test/work_packages/449) | [#68854](https://community.openproject.org/wp/68854) Multi-step project creation wizard to create and process PM²/PMflex project initiation requests |
41+
| Project Initiation Request | Project Initiation Request (work package type) | [Project Initiation Request](https://pm2.openproject.com/projects/pm2-test/work_packages/449) | [#68854](https://community.openproject.org/wp/68854) Multi-step project creation wizard to create and process PM²/PMflex project initiation requests<br />**Release info**: first version will be shipped in [17.0](https://community.openproject.org/wp/67801) behind a feature flag - general availability starting with [17.1](https://community.openproject.org/wp/69276). |
4242
| Business Case | Business Case (work package type) | [Business Case](https://pm2.openproject.com/projects/pm2-test/work_packages/450) | [#68064](https://community.openproject.org/wp/68064) Beyond documents for project artefacts<br />[#67726](https://community.openproject.org/wp/67726) Project business case widget for project overview |
4343
| Phase Gate RfP (Ready for Planning) | Phase Gate | | |
4444
| [6 Planning Phase](../../project-management-guide/6-planning-phase) | | | |

lib/api/decorators/linked_resource.rb

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ def resource(name,
9090
show_if: ->(*) { true },
9191
skip_render: nil,
9292
embedded: true)
93-
9493
link(link_attr(name, uncacheable_link, link_cache_if), &link)
9594

9695
property name,
@@ -113,7 +112,6 @@ def resources(name,
113112
show_if: ->(*) { true },
114113
skip_render: nil,
115114
embedded: true)
116-
117115
links(link_attr(name, uncacheable_link, link_cache_if), &link)
118116

119117
property name,
@@ -131,7 +129,6 @@ def resource_link(name,
131129
setter:,
132130
getter:,
133131
show_if: ->(*) { true })
134-
135132
resource(name,
136133
getter: ->(*) {},
137134
setter:,
@@ -154,16 +151,18 @@ def associated_resource(name,
154151
skip_link: skip_render,
155152
undisclosed: false,
156153
link_title_attribute: :name,
154+
link_getter: :"#{name}_id",
155+
link_property_name: nil,
157156
uncacheable_link: false,
158157
getter: associated_resource_default_getter(name, representer),
159158
setter: associated_resource_default_setter(name, as, v3_path),
160-
link: associated_resource_default_link(name,
159+
link: associated_resource_default_link(link_property_name || name,
161160
v3_path:,
162161
skip_link:,
163162
undisclosed:,
164-
title_attribute: link_title_attribute))
165-
166-
resource((as || name),
163+
title_attribute: link_title_attribute,
164+
getter: link_getter))
165+
resource(as || name,
167166
getter:,
168167
setter:,
169168
link:,
@@ -240,7 +239,6 @@ def associated_resources(name,
240239
v3_path:,
241240
skip_link:,
242241
title_attribute: link_title_attribute))
243-
244242
resources(as,
245243
getter:,
246244
setter:,
@@ -251,7 +249,6 @@ def associated_resources(name,
251249

252250
def associated_resources_default_getter(name,
253251
representer)
254-
255252
representer ||= default_representer(name.to_s.singularize)
256253

257254
->(*) do

lib/open_project/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module OpenProject
3333
module VERSION # :nodoc:
3434
MAJOR = 16
3535
MINOR = 6
36-
PATCH = 2
36+
PATCH = 3
3737

3838
class << self
3939
# Used by semver to define the special version (if any).

modules/costs/lib/api/v3/cost_entries/cost_entry_representer.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ class CostEntryRepresenter < ::API::Decorators::Single
4545

4646
# TODO: DEPRECATED!
4747
associated_resource :work_package,
48-
skip_render: ->(*) { represented.entity_type != "WorkPackage" }
48+
skip_render: ->(*) { represented.entity_type != "WorkPackage" },
49+
link_property_name: :entity, # to avoid deprecation warnings with cost_entry.work_package
50+
link_getter: :entity_id # to avoid deprecation warnings with cost_entry.work_package_id
4951

5052
property :id, render_nil: true
5153
property :units, as: :spentUnits

0 commit comments

Comments
 (0)