Skip to content
Snippets Groups Projects
  1. Jul 08, 2016
  2. Jun 09, 2016
  3. Jun 02, 2016
  4. May 26, 2016
  5. May 25, 2016
  6. May 24, 2016
  7. May 20, 2016
  8. Apr 22, 2016
  9. Mar 07, 2016
  10. Mar 01, 2016
  11. Feb 09, 2016
  12. Feb 08, 2016
  13. Feb 03, 2016
  14. Feb 02, 2016
  15. Jan 28, 2016
  16. Jan 27, 2016
  17. Jan 20, 2016
  18. Jan 12, 2016
  19. Dec 14, 2015
  20. Dec 07, 2015
  21. Oct 26, 2015
  22. Oct 25, 2015
    • Lukas Reschke's avatar
      Throw exception on `getPath` if file does not exist · 13e817e9
      Lukas Reschke authored
      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.
      13e817e9
  23. Oct 08, 2015
  24. Sep 30, 2015
  25. Jun 09, 2015
  26. May 19, 2015
  27. Mar 26, 2015
  28. Mar 25, 2015
  29. Mar 24, 2015
    • Robin Appelman's avatar
      d46b7d73
    • Lukas Reschke's avatar
      Properly catch whether a share is `null` · e2453d78
      Lukas Reschke authored
      Despite it's PHPDoc the function might return `null` which was not properly catched and thus in some situations the share was resolved to the sharing users root directory.
      
      To test this perform the following steps:
      
      * Share file in owncloud 7 (7.0.4.2)
      * Delete the parent folder of the shared file
      * The share stays is in the DB and the share via the sharelink is inaccessible. (which is good)
      * Upgrade to owncloud 8 (8.0.2) (This step is crucial. The bug is not reproduceable without upgrading from 7 to 8. It seems like the old tokens are handled different than the newer ones)
      * Optional Step: Logout, Reset Browser Session, etc.
      * Access the share via the old share url: almost empty page, but there is a dowload button which adds a "/download" to the URL.
      * Upon clicking, a download.zip is downloaded which contains EVERYTHING from the owncloud directory (of the user who shared the file)
      * No exception is thrown and no error is logged.
      
      This will add a check whether the share is a valid one and also adds unit tests to prevent further regressions in the future. Needs to be backported to ownCloud 8.
      
      Adding a proper clean-up of the orphaned shares is out-of-scope and would probably require some kind of FK or so.
      
      Fixes https://github.com/owncloud/core/issues/15097
      e2453d78
Loading