Skip to content

Allow disabling "Browser" plugin #1347

@kiler129

Description

@kiler129

Checklist

  • I have used the search function for OPEN issues to see if someone else has already submitted the same feature request.
  • I have also used the search function for CLOSED issues to see if the feature is already implemented and just waiting to be released.
  • I will describe the problem with as much detail as possible.
  • This is not about the docker image. In that case, contact the authors of the docker image.

Baikal version

0.10.1

PHP version

8.2

Problem you are having

Currently Baikal hardcodes some plugins:

$this->server = new \Sabre\DAV\Server($nodes);
$this->server->setBaseUri($this->baseUri);
$this->server->addPlugin(new \Sabre\DAV\Auth\Plugin($authBackend, $this->authRealm));
$this->server->addPlugin(new \Sabre\DAVACL\Plugin());
$this->server->addPlugin(new \Sabre\DAV\Browser\Plugin());

The only plugins that can be disabled are ones related to disabling CalDAV/CardDAV. Since I don't trust users to not break things by accident, I would like to also be able to disable the \Sabre\DAV\Browser\Plugin plugin.

Suggested solution

Introduce new dav_browser_enabled config option that defaults to true in baikal.yaml. Then such option can be controlled in the same way as CalDAV/CardDAV flag.


Since Browser "hijacks" *DAV URLs, the browser cannot easily be easily cut-out on the edge with reverse proxy (I tried even as far as matching Content-Type on response ;)). sabre/dev also doesn't have a clean remove_plugin() method or any hook to do so. So the only way now is to apply a manual patch, which is less than ideal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions