Specifying the type to int force a convertion from string to int which
fails on 32 bits for snowflake ids.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
When a user has an active session only the apps that are enabled for the
user are initially loaded. In order to cache the routes the routes for
all apps are loaded, but routes defined in routes.php are taken into
account only if the app was already loaded. Therefore, when the routes
were cached in a request by a user with an active session only the
routes for apps enabled for that user were cached, and those routes were
used by any other user, independently of which apps they had access to.
To solve that now all the enabled apps are explicitly loaded before
caching the routes.
Note that this did not affect routes defined using annotations on the
controller files; in that case the loaded routes do not depend on the
previously loaded apps, as it explicitly checks all the enabled apps.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This reverts commit 90948f5096.
It temporary disabled cache for routes until an actual fix was added,
which is done in the following commits.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This is faster than going back to nextcloud to download the files.
This is an opt-in setting that can be enabled by setting
use_presigned_url in the object store config.
Additionally add support for the proxy config which is needed in a
docker setup. See https://github.com/juliusknorr/nextcloud-docker-dev/pull/431
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
Create new events to replace deprecated CommentsEvent constant and use
them when creating CommentsEvents.
On the listener side, we can't yet use these events as deck still send
the old events.
Also fixes some issues reported by psalm level 3 on the comment app.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
This will help when troubleshooting issues. For web request we have
method and url, but for cron and occ currently we have no way to know if
it’s one or the other and which command.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
- Easy enough query directly these days; Only used in one spot anyhow
- Updated the runningOnMac method to use PHP_OS_FAMILY just for clarity until we can remove the function entirely (same result; supported since PHP ~7.4).
Signed-off-by: Josh <josh.t.richards@gmail.com>
When a logged-in user accesses a public share link in the same browser,
the system was incorrectly checking if that user's groups were excluded
from creating link shares. This caused share not found errors for users
in excluded groups, even though public shares should be accessible to anyone
with the link.
The group exclusion setting (`shareapi_allow_links_exclude_groups`) is
intended to restrict share creation, not share access. Public shares
are meant to be anonymous and accessible regardless of the viewer identity
or group membership.
We now check the exclusion for the share creator and not the viewer.
Signed-off-by: nfebe <fenn25.fn@gmail.com>