1804 Commits

Author SHA1 Message Date
Jan Sandbrink 40301c3463 Make SSRF error message more specific
Feedback from devs that were confronted with the "is not an allowed host"
message shows, that the message is not very actionable. It's not clear why something
that is clearly a legitimate and existing host would be considered "not allowed".

The new error message clearly points at the SSRF policy as the source. Making the
problem more search engine friendly and hopefully allowing admins to better understand
what they have to fix.
2026-06-08 09:34:34 +02:00
OpenProject Actions CI 523ef39065 Merge branch 'release/17.5' into dev 2026-06-01 14:42:29 +00:00
Oliver Günther c5f29b76d2 Merge remote-tracking branch 'origin/release/17.4' into release/17.5 2026-06-01 10:21:02 +02:00
Oliver Günther a74089024d Merge remote-tracking branch 'origin/release/17.3' into release/17.4 2026-06-01 10:20:50 +02:00
OpenProject Actions CI a147cf2168 Merge branch 'release/17.5' into dev 2026-05-26 13:14:53 +00:00
Eric Schubert 27487aa8ef [fix] remove superfluous escaping of location in ctor
- according to https://community.openproject.org/wp/73855 the escaping
  must only happen in the representer
- the escaping in the constructor of the storage file ancestors was
  missed, so it was removed now
2026-05-26 11:03:36 +02:00
Jan Sandbrink 5b0a186795 Merge pull request #23258 from opf/non-duplicate-project-folders
Improve error handling around duplicate project folders
2026-05-21 11:30:31 +02:00
Eric Schubert 86983e0d75 Merge branch 'dev' into implementation/73354-add-deletion-action-to-wiki-page-link 2026-05-21 10:50:52 +02:00
Dombi Attila 93594ec0f2 Merge pull request #23127 from opf/code-maintenance/74402-centralize-move-action-in-controllers
[#74402] Centralize move action in controllers
2026-05-19 19:43:36 +03:00
Oliver Günther e396a5bb53 Merge remote-tracking branch 'origin/release/17.4' into dev 2026-05-19 18:26:45 +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
Eric Schubert 83a00f3da8 Merge branch 'dev' into implementation/73354-add-deletion-action-to-wiki-page-link 2026-05-19 17:27:59 +02:00
Jan Sandbrink 1d35bd7c87 Move translations to common location
Some wordings around health checks was highly repetitive across
a few places. To reduce the amount of duplicated translations, they
have been moved to a common location.

The downside is, that now sidepanel components and full width components
will have to work from the same translations. This is not an issue so far,
because the translations were the same anyways.
2026-05-19 16:31:47 +02:00
Jan Sandbrink 1b91feeba2 Fix icon to repeat all checks
Instead of using a plus icon, which is associated
with adding something new, we are using the reload icon
which is associated with repeating something you did before.
2026-05-19 16:17:03 +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 6b63442c1b Improve error handling around duplicate project folders
Don't allow to point two project storages to the same project_folder_id
if one of them is automatically managed. This ensures that ownership is
always consistently applied according to one project only.
2026-05-19 15:18:40 +02:00
Dombi Attila 86d4831164 Update the respond_to_with_turbo_streams method to accept a service result too as a response. 2026-05-19 00:44:11 +03:00
Marcello Rocha eea1aa6549 Deal with the move of Container into Dry::Core (#23189) 2026-05-13 11:27:24 +02:00
Yauheni Suhakou 9c750ac556 [74542] Add an authentication strategy for the wikis module (#23115)
Add Authentication strategy for wikis module
2026-05-12 09:34:46 +02:00
Jan Sandbrink 6fed98298e Merge pull request #23080 from opf/core-health-validator
Move health validator to core
2026-05-07 08:13:45 +02:00
Jan Sandbrink 0e91c6ac03 Merge pull request #23071 from opf/core-health-components
Move health check components into core
2026-05-07 08:13:24 +02:00
Jan Sandbrink 6a6982b9a1 Merge pull request #23007 from opf/core-health-reports
Move storage of HealthReports into dedicated model
2026-05-07 08:13:06 +02:00
Jan Sandbrink 2d4a559cf9 Move health check components into core
The idea is to reuse them in the wikis module and probably elsewhere
as well, offering a similar look & feel.

The ReportComponent has been lightened for this, though. Previously
it included the page layout and a default to render when there was
no report. Now it only focusses on rendering an actual report and
leaves the rest up to the including component or page.
2026-05-06 16:39:32 +02:00
Jan Sandbrink 704f96e6b9 Move health validator to core
This is part of making health reports available to other modules
than storages as well. The base classes are essentially free of relevant
references to the storages module and only contain the glue code necessary
to fill a health report properly.
2026-05-06 13:03:57 +02:00
Jan Sandbrink 048b03e28b Move storage of HealthReports into dedicated model
So far they have only been stored in the Rails cache, making
them pretty volatile. They are now properly stored in the database,
theoretically allowing to also retrieve older health check results and
compare them to newer ones.

Translation responsibilities have been moved into respective components,
that are rendering the results.

This is part of a refactoring that moves health reports and their components
out of the storages module into the core, allowing them to be reused by different
modules.
2026-05-06 08:22:30 +02:00
Yauheni Suhakou 37620b1a9f [74354] Rename storage_id to integration_id (#23049)
* Rename `storage_id` to `integration_id`
2026-05-05 16:58:08 +02:00
Oliver Günther fa9f9c3c20 Add ssrf protection to nextcloud validator 2026-05-05 15:10:19 +02:00
Eric Schubert 1d89896fb5 [#73855] fix nextcloud file info query spec 2026-04-29 12:19:06 +02:00
Eric Schubert 00f49e46cd [#73855] use delete prefix for root folder name
- similar fix to commit 73911fcab8
- if site name would be equal to the folder name, this would break
- the new fix prevents this
2026-04-29 12:10:53 +02:00
Eric Schubert 2d38741b37 [#73855] fixed unit tests 2026-04-29 12:03:23 +02:00
Eric Schubert 34486d6629 Merge branch 'dev' into bug/73855-nextcloud-integration-shows-no-connection-to-nextcloud-for-folders-that-have--in-the-name 2026-04-29 10:23:59 +02:00
Eric Schubert 44f61bf2ee [#73855] move URL escaping of location param to representer 2026-04-28 17:25:56 +02:00
Yauheni Suhakou 2cd9a7b08f [73319] Create and use two-way OAuth 2 (#22816)
Update the OAuth section for the XWiki provider. Since XWiki provides only public clients, there are no client secrets passed in between OP and XWiki. Thus, the UI is, for now, just a mock with a client ID.
2026-04-28 14:07:37 +02:00
Eric Schubert ca8f1606a7 [#73855] Fix nextcloud file info
- https://community.openproject.org/work_packages/73855
- reestablish escaping of the `location` attribute of nextcloud file
  info objects
- amend specs
2026-04-27 16:23:43 +02:00
Mir Bhatia c8148ab799 Fix more redirection HTTP statuses 2026-04-22 16:44:50 +02:00
Jan Sandbrink f9d8bc6614 Introduce SubclassResponsibility error
This error is intended for cases when a method is
intentionally not implemented, because the module/class defining
it expects a subclass (or class including the module) to implement
the method.

This is intended to distinguish it from other cases, such as:
* feature not implemented yet
* edge case of a method call not yet supported

Notably it avoids the misuse of the Ruby-defined NotImplementedError,
which is only intended for much more specific scenarios:

> Raised when a feature is not implemented on the current platform. For example, methods depending on the fsync or fork system calls may raise this exception [...]

Also see https://docs.ruby-lang.org/en/master/NotImplementedError.html
2026-03-27 08:14:56 +01:00
Jan Sandbrink 2bf7d90781 Only show wikis tab when there are wikis
Effectively we only want to allow disabling the internal wiki
for now, but we'll have to answer certain usability questions
on what happens when a provider is deleted/disabled anyways, so
we'll make it technically possible to disable any provider, even
if we might not offer it for all of them out of the box.

The most likely starting scenario to have no wikis tab is that
the internal wikis are disabled and no external wiki is configured.
2026-03-25 14:24:00 +01:00
Jan Sandbrink 971c29ceaa Only warn on version mismatch
We already did this for the check of the team folders app,
but apparently forgot to do it for other dependencies too.

The main motivation is that an error would prevent all other
health checks from running, even if we are just behind by one
patch level.

It should be enough to show a warning to users when the version
does not match expectations, but it's not a hard error that should
prevent further health checks.
2026-03-20 14:05:39 +01:00
Oliver Günther d3f543ddd4 Alter i18n links to avoid inconsistency 2026-03-20 09:49:11 +01:00
Oliver Günther 4d731dcab6 Replace raw and explicit html_safe calls 2026-03-20 09:49:10 +01:00
Oliver Günther 50e16740ad Allow link attributes on link_translate 2026-03-20 08:53:15 +01:00
Jan Sandbrink 9243acb040 Merge pull request #22335 from opf/ampf-sync-now
Add button to trigger AMPF sync
2026-03-18 11:20:25 +01:00
Jan Sandbrink cc858a37ce Merge pull request #22319 from opf/more-ampf-checks
Add further AMPF health checks
2026-03-17 10:45:14 +01:00
Jan Sandbrink 4f896e851c Add further AMPF health checks
After seeing error reports about folders that would not synchronize
properly, I realized that we had no way for an admin to quantify whether
all project folders exist or for how many the creation failed.

The two new checks should cover two important questions:
* Have all project storages already synced and created a project folder?
* Is there any project storage that has a linked project folder, but it's missing?
2026-03-16 16:48:35 +01:00
Jan Sandbrink a0e2ded6d0 Add button to trigger AMPF sync
This is mostly intended for debugging purposes,
when something with AMPF goes wrong. Under normal
operation this button should not be necessary.
2026-03-16 09:31:02 +01:00
OpenProject Actions CI d2b0680ff4 Merge branch 'release/17.2' into dev 2026-03-13 04:17:03 +00:00
Jan Sandbrink 4cad35f4fb Don't break loop when folder creation fails
It's unclear to us why the creation of folder A should
also prevent the creation of folders B, C, D, E and F.

Most of the code around this is written in a way that it would
be fine with partial failures.

If no tests fail as a consequence of this change, I am inclined to
merge it.
2026-03-12 09:01:28 +01:00
Jan Sandbrink 9e576d8a95 Merge pull request #22311 from opf/reword-last-check
Rename "last check" to "last sync"
2026-03-11 16:41:28 +01:00
Jan Sandbrink 1e20effb91 Rename "last check" to "last sync"
This affects the section for "automatically managed project folders",
which actually does not indicate the time at which a dedicated health
CHECK was performed, but rather indicates the last time that an
AMPF sync was attempted and whether that succeeded or not.

This is confusing to users, because seemingly we have two health checks,
when in fact there's just a single health check. The AMPF job is a job
that performs a task and it can do so successfully or not. Hopefully this
change makes it more clear to users that if an error occurs during AMPF
sync, that something went wrong.
2026-03-11 15:31:11 +01:00
Alexander Brandon Coles 1114167834 Merge branch 'dev' into merge-release/17.2-20260311041612
# Conflicts:
#	config/locales/crowdin/fr.yml
2026-03-11 06:19:05 -03:00