Commit Graph
46 Commits
Author SHA1 Message Date
Pascal Bleser ad140be6eb fix(graph): name the space image size limit after space images
The variable that sets a lower size limit for space images alone was
named after the service, GRAPH_THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE,
which reads like a limit for thumbnails in general. Rename it to
OC_SPACE_IMAGE_THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE, and the yaml key
from thumbnails.max_input_image_file_size to
thumbnails.space_image_max_input_image_file_size.

The shared names OC_THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE and
THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE are unchanged. Neither renamed
setting has been released yet.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-13 19:01:53 +01:00
Pascal Bleser 51b92da2e5 fix(graph): refuse space images too large for a thumbnail
A space image is only ever shown as a thumbnail. When a file larger
than the thumbnail generator accepts was set as the image of a space,
the PATCH of the drive succeeded, but no thumbnail could be made of the
file, so the space showed no image and nobody got an error.

Before setting the image, graph now looks up the size of the file, and
refuses a file above the limit with 413 Request Entity Too Large,
without changing the space. The limit is the one of the thumbnail
generator: graph reads it under the same names as the webdav and
thumbnails services (OC_THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE and the
older THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE, 50MB by default, empty for
unlimited), so one setting keeps the three in agreement.
GRAPH_THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE sets a lower limit for space
images alone.

The default of 50MB is now one constant, which the graph, webdav and
thumbnails services all use.

Only the file size is checked: the dimension limits of the generator
would need the whole image to be read. The space readme has no limit,
and an empty image id is passed on unchecked, as before.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-13 15:55:12 +01:00
Pascal Bleser 0e265282d2 fix(graph): reject empty and invisible drive names on update
Updating a drive with an empty name ("name": "") succeeded and silently
kept the old name, because the name was only validated when it was
non-empty. Validate it whenever the request contains it, so an empty
name is rejected with 400 like on create. A request without a name, or
with "name": null, still leaves the name unchanged.

Space names were trimmed with strings.TrimSpace, which only removes
Unicode whitespace. Invisible formatting characters such as the
zero-width space (U+200B), the word joiner (U+2060) or the byte order
mark (U+FEFF) aren't whitespace, so a name made only of them was
accepted on create and on update, and showed up as an empty name in
every client. Trim these characters from both ends of the name as
well. Inside a name they are still allowed, since some of them are
needed there, e.g. the zero-width joiner in emoji sequences.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-10 17:16:37 +01:00
Viktor Scharf 25246782b2 [full-ci] Enhance getSpaceByName: check local cache before Graph API calls (#1574)
* Enhance getSpaceByName: check local cache before Graph API calls

* Update API endpoint for regular user drives
2025-09-30 13:08:21 +02:00
Viktor Scharf 723340dba6 [full-ci] getting personal space by userId instead of userName (#1553)
* getting personal space by userId instead of userName

* delete geting userId via api call

* add new created user id to user list

* fix after review
2025-09-26 10:51:41 +02:00
Viktor Scharf f0971d9fe4 test for #452 (#826) 2025-05-13 09:16:44 +02:00
Viktor Scharf 113725794d delete issue message in top of the feature files 2025-02-04 12:37:58 +01:00
Niraj Acharya c98841904d removing without skeleton files string from the user creation steps 2024-12-02 09:12:57 +05:45
Niraj Acharya 66856ef91e adding test for editing space with role space editor without version 2024-10-23 09:48:55 +05:45
prashant-gurung899 8821017a77 lint the gherkin feature files
Signed-off-by: prashant-gurung899 <prasantgrg777@gmail.com>
2024-06-12 10:13:01 +05:45
Salipa Gurung 971f34ac0a [tests-only] [full-ci] Use sharing ng in api spaces (#9082)
* update given step using sharingNg in changeSpaces.feature

* update given step using sharingNg in disableAndDeleteSpaces.feature

* update given step using sharingNg in editPublicLinkOfSpace.feature

* update given step using sharingNg in filePreviews.feature

* update given step using sharingNg in listSpaces.feature

* update given step using sharingNg in publicLink.feature

* update given step using sharingNg in removeSpaceObjects.feature
2024-05-09 14:07:56 +05:45
Prarup Gurung fcba2d34a4 Used kebab case for example table header name 2024-03-21 10:04:25 +05:45
Sawjan Gurung 3cea035d6d [tests-only] use new json schema assertion lib that supports latest schema drafts (#8503)
* test(api): use new json schema assertion lib that supports latest schema drafts

* test(api): fix json schema

* test(api): fix method call

* test(api): update expected failure lines

* test(api): add custom schema validator

* test(api): add custom schema validator

* test(api): add custom schema validator

* test(api): add custom schema validator

* test(api): make json array validation strict

* test(api): fix php code style

* test(api): update expected failure lines
2024-02-23 16:24:22 +05:45
nirajacharya2 4592d06c2b fixing incorrect json format for json assertion steps (#8265) 2024-01-24 09:57:19 +05:45
Sabin Panta 1c6600365c [tests-only][full-ci] Refactoring all graphapi related featurefile wording (#7389)
* refactoring the feature file steps

* addressing review
2023-10-30 17:57:42 +05:45
Karun Atreya 83971fa19a [tests-only] [full-ci] removing the setresponse in given/then step in spaces context (#7496)
* refactor given/when/then steps in spaces context

* pass the returned response without setting in then step

* added the missing when step whose response is checked by the then step

* addressed the reviews

* changed from decoded body to docoded response
2023-10-17 11:41:47 +05:45
Sawjan Gurung c59b597984 [tests-only] Run tests with default propfind depth infinity config (#7334)
* use default config for OCDAV_ALLOW_PROPFIND_DEPTH_INFINITY

* remove unnecessary steps

* use default propfind depth infinity value

* use correct step to check the resources

* use correct step to check the resources

* cover depth:infinity enabled test cases

* fix steps

* fix scenario steps

* update expected failure list

* add depth infinity test suite to ci

* update existing tests only

* remove test with depth:infinity
2023-10-03 09:26:31 +05:45
nirajacharya2 5f93a22eb9 removing @api tag from all acceptance feature files (#7027) 2023-08-16 09:29:00 +05:45
Viktor Scharf 5867dae18f using Graph instead Of Setting Method In Tests 2023-06-15 17:03:53 +02:00
Michael Barz d5dcaaa7b4 fix test expectations 2023-06-06 16:03:43 +02:00
Roman Perekhod 5fbee63f09 fix tests 2023-05-08 16:13:52 +02:00
Roman Perekhod d69decdafe fix Graph delete request leaks existence of space #5031 2023-05-08 16:13:52 +02:00
Amrita 517a177057 [tests-only] [full-ci] Refactor scenario related to checking json response (#6034)
* Separate positive and negative testing in different scenario

* Remove duplicate scenario

* Refactor json step graamer

* Remove unnecessary steps

* Add step to check space disable state
2023-05-04 14:55:11 +02:00
amrita 56a64b98ee Remove tag skipOnOcV10 2023-05-04 12:42:14 +05:45
Phil Davis 7fb93058cf tidy up acceptance tests 2023-04-21 14:59:50 +05:45
Swikriti Tripathi 6281d132d8 update grammar 2023-04-20 15:32:16 +05:45
Swikriti Tripathi 7db5b86bd4 Refactor the syntax of the scenarios in local API tests 2023-04-20 15:32:15 +05:45
Sagar Gurung 26c9f889e7 [tests-only][full-ci]Clean up old JSON assertion step (#6013) 2023-04-11 17:09:31 +05:45
Prajwol AmatyaandMichael Barz 7baac4f050 [tests-only][full-ci] Api test for user trying to set own personal space quota (#5979)
* api test for user trying to set their own personal space quota

* removed duplicate scenarios for set quota

* updated expected scenario

* fix wrong status code

* updated expected failure scenario after wrong status code fix

---------

Co-authored-by: Michael Barz <mbarz@owncloud.com>
2023-04-04 12:41:34 +05:45
Sagar Gurung 67296caf14 Forward port json drill apispaces (#5818)
* Added json schema for response check in apiSpaces suite

Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>

* Review Address

* Added schema for space management feature

* Added new schema asper change in master

* fix feature file

---------

Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
2023-03-15 10:06:58 +05:45
Viktor Scharf 1730538836 [test-only][full-ci] ApiTest. share space with expiration date (#5562) 2023-02-17 14:03:53 +05:45
Swikriti Tripathi 6a4ee395bf Adds tests for sending PATCH request to other user's space
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
2023-01-05 07:42:32 +05:45
Swikriti TripathiandViktor Scharf 1d51c1ccbd [tests-only][full-ci] Forward port send invalid UUID master (#5321)
* add test

* fix after review

* fix

Co-authored-by: Viktor Scharf <scharf.vi@gmail.com>
2023-01-04 17:00:59 +05:45
Viktor Scharf 51e88c9fff check urestricted quota 2022-11-30 15:54:46 +01:00
Swikriti Tripathi 0387e15d34 Reuse the core code 2022-09-16 15:40:51 +05:45
Viktor Scharf d7c406edde add tests changing quota 2022-08-04 13:11:51 +02:00
Viktor Scharf 156d9e9e86 ApiTests. refactoring apiSpace suite (#4121) 2022-07-08 09:03:40 +05:45
Viktor Scharf bed3d9f53b add test with no restriction quota (#3814) 2022-05-19 11:05:36 +02:00
Viktor Scharf 7cb9ec2a46 apiTests: getting readmi file and spaceImage file 2022-03-30 21:34:41 +02:00
Viktor Scharf 3e2d1582a3 [tests-only] ApiTest: set space image/description to space (#3289)
* add tests: set space image/description to space

* php style fix. add checking that file exists
2022-03-10 09:29:26 +01:00
Michael Barz af0a5fac18 Create space with description (#3168)
* send description during create space

* add changelog

* update reva

* add to API test

* only use opaque if not nil

* use forked xattr to fix windows build

Signed-off-by: Michael Barz <mbarz@owncloud.com>
2022-02-15 14:18:27 +01:00
Phil Davis b7fc7ee990 Reword Spaces API scenario descriptions 2021-12-21 13:55:59 +05:45
ScharfViktor a531db28fb add test share space 2021-12-20 17:48:35 +01:00
Michael Barz 7c2e70f8b6 fix api tests 2021-12-12 17:34:04 +01:00
ScharfViktor 216a62cf2e add Given form for steps 2021-12-02 00:01:52 +01:00
ScharfViktor f5c763cbec add tests change space 2021-11-23 19:51:15 +01:00