diff U3 a/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php b/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php --- a/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php Wed Feb 03 10:47:36 2016 +++ b/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php Sat Feb 20 18:19:46 2016 @@ -12,6 +12,7 @@ use Drupal\Core\Render\Element; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\RedirectResponse; /** * Provides the file transfer authorization form. @@ -70,7 +71,7 @@ // Decide on a default backend. if ($authorize_filetransfer_default = $form_state->getValue(array('connection_settings', 'authorize_filetransfer_default'))); - elseif ($authorize_filetransfer_default = $this->config('system.authorize')->get('filetransfer_default')); + elseif ($authorize_filetransfer_default = $this->configFactory()->getEditable('system.authorize')->get('filetransfer_default')); else { $authorize_filetransfer_default = key($available_backends); } @@ -220,15 +221,18 @@ } } // Set this one as the default authorize method. - $this->config('system.authorize')->set('filetransfer_default', $filetransfer_backend); + $this->configFactory()->getEditable('system.authorize')->set('filetransfer_default', $filetransfer_backend); // Save the connection settings minus the password. - $this->config('system.authorize')->set('filetransfer_connection_settings_' . $filetransfer_backend, $connection_settings); + $this->configFactory()->getEditable('system.authorize')->set('filetransfer_connection_settings_' . $filetransfer_backend, $connection_settings); $filetransfer = $this->getFiletransfer($filetransfer_backend, $form_connection_settings[$filetransfer_backend]); // Now run the operation. $response = $this->runOperation($filetransfer); - if ($response instanceof Response) { + + if ($response instanceof RedirectResponse) { + $response->send(); + }elseif ($response instanceof Response) { $form_state->setResponse($response); } } @@ -249,6 +253,7 @@ break; } } + /** * Gets a FileTransfer class for a specific transfer method and settings. @@ -285,7 +290,7 @@ * @see hook_filetransfer_backends() */ protected function addConnectionSettings($backend) { - $auth_connection_config = $this->config('system.authorize')->get('filetransfer_connection_settings_' . $backend); + $auth_connection_config = $this->configFactory()->getEditable('system.authorize')->get('filetransfer_connection_settings_' . $backend); $defaults = $auth_connection_config ? $auth_connection_config : array(); $form = array();