Commit Graph

8476 Commits

Author SHA1 Message Date
Oliver Günther 38ab5af1ff Merge remote-tracking branch 'origin/release/17.3' into release/17.4 2026-06-01 13:57:33 +02:00
Oliver Günther 9ed3392dae Better whitelisting of allowed macros and data-attributes 2026-06-01 13:57:18 +02:00
Oliver Günther 61cd01b784 Add associated_visible_resource to properly handle undisclosed work packages 2026-05-26 07:09:59 +02:00
Oliver Günther d6d7abea19 Merge pull request #23304 from opf/fix/message-pack-safe-buffer-serialization
Allow serialization of safebuffer without encoding issues
2026-05-22 10:35:50 +02:00
Oliver Günther ad94533f4a Fix merge of release/17.3 into 17.4 2026-05-19 19:55:48 +02:00
Oliver Günther 637ec7d10f Merge remote-tracking branch 'origin/release/17.3' into release/17.4 2026-05-19 18:26:23 +02:00
Oliver Günther 91a8bf7ba8 Use .to_hash on the schema representer before caching 2026-05-19 18:25:37 +02:00
Jan Sandbrink e7bee82f9e Introduce and use ConfidentialCache
It's like OpenProject::Cache, but it encrypts cached
values at rest. Callers that store confidential things in the cache
have been updated to use it, reducing the risk to expose secrets
to an attacker that obtained access to the contents of OpenProject's cache.
2026-05-19 15:56:53 +02:00
Jan Sandbrink 2a52a11f34 Extend interface of OpenProject::Cache
Also expose the #delete method offered by Rails caches.
Adapt the interface of existing methods to stricter follow
the upstream interface. neither #read nor #write accept passing
a block to them.
2026-05-19 14:23:10 +02:00
Jan Sandbrink e388fccffd Use class << self for class methods
This makes it easier to add private class methods
and IMHO is slightly more readable.
2026-05-19 11:05:22 +02:00
Oliver Günther 928da22493 Bumped version to 17.4.1
[ci skip]
2026-05-13 08:46:32 +02:00
Oliver Günther e5ce2359f6 Bumped version to 17.3.3
[ci skip]
2026-05-13 07:59:38 +02:00
Oliver Günther 7ae5604869 Merge pull request #23070 from opf/fix/relation-visible-scope
The performance decreased because of a combination of calls that were supposed to increase performance. 

We have a mechanism in place which automatically eager loads models needed in the element representers when a collection of them is rendered. This is to avoid N+1 queries of course. But, if eager loading is  combined with e.g., a LIMIT, which we do because we paginate, rails automatically falls back to issuing two instead of just one SQL statement. Which makes sense as otherwise LEFT JOINS might mess with the result set. 

But Rails does so in a somewhat simple fashion. It uses the first query to get the DISTINCT ids. The second is used to load the values (without a limit). But instead of removing all WHERE statements in the second SQL statement and then apply just the one for the ids, it keeps the original WHERE statement and applies the one for the ids on top. The problem with that is that the database trips on that (I didn't check the why) and uses a less than optimal query plan. 

That was the problem here as well. The first query remained reasonable quick (300ms) but the second one took 25s. 

The fix is to split the two statements by hand in the representer whenever eager loading is defined. The first query has all the filters but no eager loading and fetches the ids. The second takes the ids, and with eager loading included loads the data. Et voila, second query takes 10ms.   

That at least works for relations, work_packages and projects. But there are other representers that also seem to have custom behaviour. I'm looking into whether they can be easily adapted.
2026-05-07 15:44:13 +02:00
Oliver Günther c660802146 Merge remote-tracking branch 'origin/release/17.3' into release/17.4 2026-05-06 09:19:25 +02:00
Andrej 49f2465efe Merge pull request #22998 from opf/bug/74536-errors-with-include-project-work-package-list-filter-with-a-portfolio
include filter working with portfolios and programs
2026-05-05 12:27:38 +02:00
Oliver Günther 80d8571992 Tighter css sanitization rules
So far, we've been using the relaxed sanitization rule set. We only need some styles for the table display in CKEditor,
other styles should not be allowed.
2026-05-04 15:12:31 +02:00
David F 68f3d335fa Add optional hidden sentinel field for Primer’s checkbox groups. wp/74398 2026-04-30 11:10:28 +02:00
ulferts 222639f8d4 include filter working with portfolios and programs 2026-04-30 10:18:09 +02:00
Oliver Günther 8eca1925ec Respect activation limit in user unlocking
https://community.openproject.org/work_packages/74373
2026-04-24 09:19:06 +02:00
Oliver Günther 6877e29351 Validate current user password confirmation when changing passwords through API
https://community.openproject.org/work_packages/74335
2026-04-23 14:19:50 +02:00
OpenProject Actions CI ca54954220 Merge branch 'release/17.3' into dev 2026-04-23 04:33:10 +00:00
Oliver Günther 02ae6a9119 Remove password min-rules in favor of clearly listed/checked password rules
https://community.openproject.org/work_packages/73461
2026-04-22 13:43:42 +02:00
Oliver Günther 7135dfc2c4 Add additional validations for path validation for posix on repositories 2026-04-22 11:23:37 +02:00
Pavel Balashou 10f2ed7efe Merge pull request #22842 from opf/jira-import-ssrf
Use ssrf filtering in Jira Import.
2026-04-21 15:26:40 +02:00
Tobias Dillmann a42eb98f87 [#73104] Move api resource link out of the model 2026-04-21 13:55:12 +02:00
Tobias Dillmann 4d3205636e [#73104] Remove backlogs module pollution from core
We delegate the resource name to the object itself, that way we can
override it in our record and no knowledge about the backlogs module is
necessary in the core.
2026-04-21 13:55:12 +02:00
Tobias Dillmann 281e44762f [#73104] Allow resource linking for sprints
This is necessary to make the group_by work
2026-04-21 13:55:12 +02:00
Kabiru Mwenja 234a870060 Merge pull request #22704 from opf/feature/73716-adapt-work-package-show-view-for-project-based-semantic-work-package-identifiers
Adapt work package show view for semantic identifiers
2026-04-21 13:52:23 +03:00
Kabiru Mwenja 79d4e67a0d Merge pull request #22718 from opf/feature/73756-adapt-routes-for-project-based-semantic-work-package-identifiers
Make find/exists? resolve semantic work package identifiers
2026-04-21 13:13:54 +03:00
Oliver Günther a92edf17a6 Merge remote-tracking branch 'origin/release/17.3' into dev 2026-04-21 11:00:11 +02:00
Oliver Günther 61266cd96b Validate use of existing managed repository paths
https://community.openproject.org/work_packages/74165
2026-04-21 10:59:52 +02:00
Pavel Balashou 53e33770c2 Use ssrf filtering in Jira Import. 2026-04-21 10:29:45 +02:00
Oliver Günther fad228d8d3 Remove style with content 2026-04-20 19:38:03 +02:00
Oliver Günther 12160eab43 Add svg to remove list 2026-04-20 19:38:03 +02:00
Oliver Günther 4abbc75f22 Remove commonmarker GFM tagfilter extension
We already use our own extensive sanitization pipeline, and it turns out
tagfilter is extremely slow on large oneline input (such as big tables).

Rendering a large table inside a work package (2k rows, 20k cells) caused tagfilter to run for over 2 minutes.
Added a separate spec to test all tags the tagfilter filters for to avoid its runaway execution time.
2026-04-20 16:52:10 +02:00
Oliver Günther 098bd4927c Bumped version to 17.3.2
[ci skip]
2026-04-20 13:08:33 +02:00
Klaus Zanders 8d15647333 Merge pull request #22372 from opf/departments-admin-menu
Manage organizations in Admin Menu
2026-04-20 12:39:43 +02:00
Alexander Brandon Coles 7b3b6bdbf3 Clean up remaining Backlogs dead code
Restore the minimal admin settings blankslate so the admin menu route
remains valid after the sprint-based cleanup. Remove the remaining
settings-driven story/task classification code, dead models and
services, and the obsolete filter and spec setup that depended on it.
2026-04-17 10:14:14 +01:00
OpenProject Actions CI 0c68614c6e Merge branch 'release/17.3' into dev 2026-04-17 04:32:30 +00:00
Klaus Zanders 710eac52ba Do not allow changing the organizational_unit flag and allow setting parent in the API 2026-04-16 18:11:13 +02:00
Oliver Günther 96397d7388 Explicit path validation on svn targets
https://community.openproject.org/work_packages/73978
2026-04-16 15:51:52 +02:00
Kabiru Mwenja 6c02cd1fea Separate displayId from wp.id to fix cascading bugs
Overriding wp.id to return the semantic identifier (e.g. "PROJ-42")
broke cache keys, API filters, row rendering, and CSS selectors that
all depend on the numeric PK.

Instead, keep wp.id as the numeric PK and add two new properties:
- displayId: returns the user-facing identifier ("PROJ-42" or "123")
- displayIdWithHash: returns "#PROJ-42" or "#123" for UI display

Also adds a COALESCE fallback in the SQL representer so work packages
created before semantic mode was enabled still get a valid displayId.
2026-04-15 18:59:42 +03:00
Kabiru Mwenja 8d13c2ac93 Fix grammar in multi-argument error and clarify API route param
- "find are not yet supported" → "find is not yet supported"
- Add semantic identifier example to API route param description
2026-04-15 16:42:18 +03:00
Jan Sandbrink 61c6f8f616 Merge pull request #22758 from opf/extend-pattern-matcher-filter
Allow to extend PatternMatcherFilters via method call
2026-04-15 13:08:50 +02:00
Oliver Günther 94a79e67c0 Bumped version to 17.3.1
[ci skip]
2026-04-15 07:47:24 +02:00
Jan Sandbrink ded6d960c0 Allow to extend PatternMatcherFilters via method call
Instead of requiring plugins to overwrite the .matchers method,
they can now call .append_matcher with their custom matcher.
2026-04-14 16:47:17 +02:00
Kabiru Mwenja 63e9854836 Make find/exists? resolve semantic work package identifiers
Extract FinderMethods module that transparently resolves both numeric and
semantic identifiers (e.g. "PROJ-42") using FriendlyId's Object#friendly_id?
for dispatch. The module is included in both the WorkPackage class and
extended onto every relation, so scoped queries like
WorkPackage.visible(user).find("PROJ-42") work seamlessly.

- Override find to resolve semantic IDs via identifier column + alias table
- Override exists? with the same resolution chain
- Refactor find_by_id_or_identifier to use friendly_id? instead of semantic_id?
- Update API route to accept string IDs (type: Integer → type: String)
- Update controller and ViewComponent finders to use find_by_id_or_identifier
- Pass display_id from Rails views to Angular custom elements
2026-04-14 17:38:12 +03:00
Kabiru Mwenja 54423b842d Expose displayId in API v3 work package endpoints (#22710) 2026-04-14 17:17:46 +03:00
ulferts 52637b49b1 bump grape 2026-04-14 09:34:44 +02:00
Kabiru Mwenja 5bbc4e7563 Rename semanticId to displayId, make always present
Replace the conditional `semanticId` API field with `displayId` which is
always present in work package responses. In semantic mode it returns the
project-based identifier (e.g. "PROJ-42"), in classic mode it returns the
numeric ID as a string. This gives API consumers (frontend, mobile) a
single field to read without conditional logic.

- Add `WorkPackage#display_id` method that encapsulates the mode check
- Update both representers (JSON and SQL) to render `displayId` unconditionally
- Update OpenAPI schema documentation
2026-04-13 14:04:39 +03:00