nextcloud/apps/files_sharing/tests
Lukas Reschke 13e817e901 Throw exception on `getPath` if file does not exist
Currently the `getPath` methods returned `NULL` in case when a file with the specified ID does not exist. This however mandates that developers are checking for the `NULL` case and if they do not the door for bugs with all kind of impact is widely opened.

This is especially harmful if used in context with Views where the final result is limited based on the result of `getPath`, if `getPath` returns `NULL` PHP type juggles this to an empty string resulting in all possible kind of bugs.

While one could argue that this is a misusage of the API the fact is that it is very often misused and an exception will trigger an immediate stop of execution as well as log this behaviour and show a pretty error page.

I also adjusted some usages where I believe that we need to catch these errors, in most cases this is though simply an error that should hard-fail.
2015-10-25 17:58:21 +01:00
..
api update licence headers via script 2015-10-05 21:15:52 +02:00
controller Throw exception on `getPath` if file does not exist 2015-10-25 17:58:21 +01:00
external fix test 2015-10-05 16:43:10 +02:00
js Fix and extend unit tests 2015-10-02 12:45:52 +02:00
middleware update licence headers via script 2015-10-05 21:15:52 +02:00
activity.php Use shorter text on the sidebar for files_sharing activities 2015-10-02 10:01:33 +02:00
api.php Return permissions and expiration on create share responses 2015-08-30 15:42:19 +02:00
backend.php Update license headers 2015-03-26 11:44:36 +01:00
cache.php adjust test 2015-04-27 14:07:15 +02:00
capabilities.php update licence headers via script 2015-10-05 21:15:52 +02:00
deleteorphanedsharesjobtest.php update license headers and authors 2015-06-25 14:13:49 +02:00
etagpropagation.php Throw exception on `getPath` if file does not exist 2015-10-25 17:58:21 +01:00
expiresharesjobtest.php Add backgroundjob to expire link shares 2015-10-20 08:18:53 +02:00
externalstorage.php Update license headers 2015-03-26 11:44:36 +01:00
grouppropagationmanager.php Propagate shares etag when group membership changed 2015-10-06 15:02:22 +02:00
helper.php always fall back to default share folder 2015-03-26 21:56:44 +01:00
locking.php update licence headers via script 2015-10-05 21:15:52 +02:00
migrationtest.php Update license headers 2015-03-26 11:44:36 +01:00
permissions.php update licence headers via script 2015-10-05 21:15:52 +02:00
server2server.php update licence headers via script 2015-10-05 21:15:52 +02:00
share.php update licence headers via script 2015-10-05 21:15:52 +02:00
sharedmount.php update licence headers via script 2015-10-05 21:15:52 +02:00
sharedstorage.php Fix shared storage tests for non local home storage 2015-10-16 21:41:51 +02:00
sizepropagation.php test objectstore with ceph docker 2015-10-06 16:27:25 +02:00
testcase.php Move dummy backend to Tests namespace 2015-09-22 11:01:11 +02:00
unsharechildren.php handle error during setup 2015-06-29 14:06:32 +02:00
updater.php Merge pull request #17083 from owncloud/share-etag-update-target 2015-06-29 09:10:37 +02:00
watcher.php Make shared folder size propagation test work with object home storage 2015-10-16 21:41:51 +02:00