Skip to content
Snippets Groups Projects
  • Lukas Reschke's avatar
    baa95034
    Use OC.webroot instead of calculating the URL · baa95034
    Lukas Reschke authored
    Calculating the URL is error-prone as it doesn't work when for example `public.php` is requested and might even be harmful as it could leak sensitive information.
    
    Since `oc.js` is even available when maintenance mode is available it is better to use the global `OC.webroot` that is not controlled by any user.
    baa95034
    History
    Use OC.webroot instead of calculating the URL
    Lukas Reschke authored
    Calculating the URL is error-prone as it doesn't work when for example `public.php` is requested and might even be harmful as it could leak sensitive information.
    
    Since `oc.js` is even available when maintenance mode is available it is better to use the global `OC.webroot` that is not controlled by any user.