nextcloud/apps/files_sharing/lib
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
..
controllers Throw exception on `getPath` if file does not exist 2015-10-25 17:58:21 +01:00
exceptions update licence headers via script 2015-10-05 21:15:52 +02:00
external Merge pull request #19589 from owncloud/shares-external-mount-provider 2015-10-07 17:46:33 +02:00
middleware update licence headers via script 2015-10-05 21:15:52 +02:00
propagation Throw exception on `getPath` if file does not exist 2015-10-25 17:58:21 +01:00
share Throw exception on `getPath` if file does not exist 2015-10-25 17:58:21 +01:00
activity.php Fix intendation 2015-10-02 10:01:33 +02:00
cache.php handle NoUserException in sharing code 2015-10-22 17:04:36 +02:00
capabilities.php Reflect enabled shareAPI in capabilities 2015-09-25 20:12:41 +02:00
deleteorphanedsharesjob.php Fix DeleteOrphanedSharesJob 2015-05-04 13:58:58 +02:00
expiresharesjob.php Add backgroundjob to expire link shares 2015-10-20 08:18:53 +02:00
helper.php Throw exception on `getPath` if file does not exist 2015-10-25 17:58:21 +01:00
hooks.php update licence headers via script 2015-10-05 21:15:52 +02:00
isharedstorage.php Update license headers 2015-03-26 11:44:36 +01:00
maintainer.php Update license headers 2015-03-26 11:44:36 +01:00
migration.php Update license headers 2015-03-26 11:44:36 +01:00
mountprovider.php Delay listening to owner changes untill we use a share for that owner 2015-09-23 16:22:53 +02:00
notifier.php Fix the parameter order in the translation 2015-09-16 06:47:40 +02:00
scanner.php Update license headers 2015-03-26 11:44:36 +01:00
sharedmount.php update licence headers via script 2015-10-05 21:15:52 +02:00
sharedstorage.php Fix getEtag for roots of shared storages 2015-10-06 16:33:37 +02:00
updater.php update licence headers via script 2015-10-05 21:15:52 +02:00
watcher.php Update license headers 2015-03-26 11:44:36 +01:00