Commit 6ba29e34 authored by Vincent Petry's avatar Vincent Petry Committed by Thomas Müller
Browse files

Don't auto-trust servers by default when creating remote shares (#26424)

This makes sure that only admins who really want this feature must
opt-in instead of opt-out.
parent b7162893
......@@ -135,7 +135,7 @@ class TrustedServers {
* @return bool
*/
public function getAutoAddServers() {
$value = $this->config->getAppValue('federation', 'autoAddServers', '1');
$value = $this->config->getAppValue('federation', 'autoAddServers', '0');
return $value === '1';
}
......
......@@ -170,7 +170,7 @@ class TrustedServersTest extends TestCase {
*/
public function testGetAutoAddServers($status, $expected) {
$this->config->expects($this->once())->method('getAppValue')
->with('federation', 'autoAddServers', '1')->willReturn($status);
->with('federation', 'autoAddServers', '0')->willReturn($status);
$this->assertSame($expected,
$this->trustedServers->getAutoAddServers()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment