    public function settings_save() {
        AuthUser::load();
        if (!AuthUser::isLoggedIn()) {
            redirect(get_url('login'));
        } else if (!AuthUser::hasPermission('admin_edit')) {
            Flash::set('error', __('You do not have permission to access the requested page!'));
            redirect(get_url());
        }
        
        if (!isset($_POST['settings'])) {
            Flash::set('error', 'File Manager - ' . __('form was not posted.'));
            redirect(get_url('plugin/file_manager/settings'));
        } else {
            $settings = $_POST['settings'];

            if ($settings['umask'] == 0)
                $settings['umask'] = 0;
            elseif (!preg_match('/^0?[0-7]{3}$/', $settings['umask']))
                $settings['umask'] = 0;
            if (strlen($settings['umask']) === 3)
                $settings['umask'] = '0' . $settings['umask'];
            elseif (strlen($settings['umask']) !== 4 && $settings['umask'] != 0)
                $settings['umask'] = 0;

            if (!preg_match('/^0?[0-7]{3}$/', $settings['dirmode']))
                $settings['dirmode'] = '0755';
            if (strlen($settings['dirmode']) === 3)
                $settings['dirmode'] = '0' . $settings['dirmode'];

            if (!preg_match('/^0?[0-7]{3}$/', $settings['filemode']))
                $settings['filemode'] = '0755';
            if (strlen($settings['filemode']) === 3)
                $settings['filemode'] = '0' . $settings['filemode'];
        }

        if (Plugin::setAllSettings($settings, 'file_manager'))
            Flash::setNow('success', 'File Manager - ' . __('plugin settings saved.'));
        else
            Flash::setNow('error', 'File Manager - ' . __('plugin settings not saved!'));

        $this->display('file_manager/views/settings', array('settings' => $settings));
    }
The product receives input or data, but it does
        not validate or incorrectly validates that the input has the
        properties that are required to process the data safely and
        correctly.