From c8ed409e9eb32ed0faeafc6a1d3dc89d665f74c4 Mon Sep 17 00:00:00 2001 From: vakarisz Date: Thu, 7 Jul 2022 12:18:58 +0300 Subject: [PATCH 01/10] Island: Change agent_configuration.py POST to parse from json --- monkey/monkey_island/cc/resources/agent_configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/resources/agent_configuration.py b/monkey/monkey_island/cc/resources/agent_configuration.py index 0f9279bba..47be16abc 100644 --- a/monkey/monkey_island/cc/resources/agent_configuration.py +++ b/monkey/monkey_island/cc/resources/agent_configuration.py @@ -24,7 +24,7 @@ class AgentConfiguration(AbstractResource): @jwt_required def post(self): try: - configuration_object = AgentConfigurationObject.from_json(request.data) + configuration_object = AgentConfigurationObject.from_mapping(request.json) self._agent_configuration_repository.store_configuration(configuration_object) return make_response({}, 200) except (InvalidConfigurationError, json.JSONDecodeError) as err: From 30f122dfc3c377a46163ef32a65e94d80ebd1b81 Mon Sep 17 00:00:00 2001 From: vakarisz Date: Thu, 7 Jul 2022 12:21:22 +0300 Subject: [PATCH 02/10] UI: Use updated configuration endpoint in ConfigurePage.js --- .../cc/ui/src/components/pages/ConfigurePage.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js index 8bcad002b..d31a4fd2f 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js @@ -19,7 +19,7 @@ import HtmlFieldDescription from '../configuration-components/HtmlFieldDescripti import CONFIGURATION_TABS_PER_MODE from '../configuration-components/ConfigurationTabs.js'; import {SCHEMA} from '../../services/configuration/config_schema.js'; -const CONFIG_URL = '/api/configuration/island'; +const CONFIG_URL = '/api/agent-configuration'; export const API_PBA_LINUX = '/api/file-upload/PBAlinux'; export const API_PBA_WINDOWS = '/api/file-upload/PBAwindows'; @@ -68,10 +68,8 @@ class ConfigurePageComponent extends AuthComponent { } componentDidMount = () => { - let urls = ['/api/agent-configuration']; - // ??? Why fetch config here and not in `render()`? - Promise.all(urls.map(url => this.authFetch(url).then(res => res.json()))) - .then(data => { + this.authFetch(CONFIG_URL).then(res => res.json()) + .then(monkeyConfig => { let sections = []; let monkeyConfig = data[0]; // TODO: Fix when we add plugins @@ -322,7 +320,7 @@ class ConfigurePageComponent extends AuthComponent { sendConfig() { return ( - this.authFetch('/api/configuration/island', + this.authFetch(CONFIG_URL, { method: 'POST', headers: {'Content-Type': 'application/json'}, From d1b586d26077b7505de283caa77068d9ed44292c Mon Sep 17 00:00:00 2001 From: vakarisz Date: Thu, 7 Jul 2022 15:55:33 +0300 Subject: [PATCH 03/10] UI: Adjust config to interact with new agent-configuration endpoint Submit, export and import were adjusted to match and reformat config. --- .../ExportConfigModal.tsx | 3 +- .../ImportConfigModal.tsx | 18 +++---- .../configuration-components/ReformatHook.js | 8 +++ .../ui/src/components/pages/ConfigurePage.js | 52 +++++++++++-------- 4 files changed, 46 insertions(+), 35 deletions(-) create mode 100644 monkey/monkey_island/cc/ui/src/components/configuration-components/ReformatHook.js diff --git a/monkey/monkey_island/cc/ui/src/components/configuration-components/ExportConfigModal.tsx b/monkey/monkey_island/cc/ui/src/components/configuration-components/ExportConfigModal.tsx index 469d91ec3..ef11dd67f 100644 --- a/monkey/monkey_island/cc/ui/src/components/configuration-components/ExportConfigModal.tsx +++ b/monkey/monkey_island/cc/ui/src/components/configuration-components/ExportConfigModal.tsx @@ -4,6 +4,7 @@ import React, {useState} from 'react'; import FileSaver from 'file-saver'; import '../../styles/components/configuration-components/ExportConfigModal.scss'; import {encryptText} from '../utils/PasswordBasedEncryptor'; +import {reformatConfig} from './ReformatHook'; type Props = { @@ -21,7 +22,7 @@ const ConfigExportModal = (props: Props) => { } function onSubmit() { - let config = props.configuration; + let config = reformatConfig(props.configuration, true); let config_export = {'metadata': {}, 'contents': null}; if (radioValue === 'password') { diff --git a/monkey/monkey_island/cc/ui/src/components/configuration-components/ImportConfigModal.tsx b/monkey/monkey_island/cc/ui/src/components/configuration-components/ImportConfigModal.tsx index a60a25c0f..cce66a521 100644 --- a/monkey/monkey_island/cc/ui/src/components/configuration-components/ImportConfigModal.tsx +++ b/monkey/monkey_island/cc/ui/src/components/configuration-components/ImportConfigModal.tsx @@ -20,8 +20,7 @@ type Props = { const ConfigImportModal = (props: Props) => { - // TODO: change this endpoint to the new configuration import endpoint - const configImportEndpoint = '/api/configuration/import'; + const configImportEndpoint = '/api/agent-configuration'; const [uploadStatus, setUploadStatus] = useState(UploadStatuses.clean); const [configContents, setConfigContents] = useState(null); @@ -71,18 +70,15 @@ const ConfigImportModal = (props: Props) => { { method: 'POST', headers: {'Content-Type': 'application/json'}, - body: JSON.stringify({ - config: configContents, - }) + body: JSON.stringify(configContents) } - ).then(res => res.json()) - .then(res => { - if (res['import_status'] === 'invalid_configuration') { - setUploadStatus(UploadStatuses.error); - setErrorMessage(res['message']); - } else if (res['import_status'] === 'imported') { + ).then(res => { + if (res.ok) { resetState(); props.onClose(true); + } else { + setUploadStatus(UploadStatuses.error); + setErrorMessage("Configuration file is corrupt or in an outdated format."); } }) } diff --git a/monkey/monkey_island/cc/ui/src/components/configuration-components/ReformatHook.js b/monkey/monkey_island/cc/ui/src/components/configuration-components/ReformatHook.js new file mode 100644 index 000000000..322882194 --- /dev/null +++ b/monkey/monkey_island/cc/ui/src/components/configuration-components/ReformatHook.js @@ -0,0 +1,8 @@ +export function reformatConfig(config, reverse = false) { + if (reverse) { + config['payloads'] = [{'name': 'ransomware', 'options': config['payloads']}] + } else { + config['payloads'] = config['payloads'][0]['options']; + } + return config; + } diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js index d31a4fd2f..1587cc11a 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js @@ -18,6 +18,7 @@ import applyUiSchemaManipulators from '../configuration-components/UISchemaManip import HtmlFieldDescription from '../configuration-components/HtmlFieldDescription.js'; import CONFIGURATION_TABS_PER_MODE from '../configuration-components/ConfigurationTabs.js'; import {SCHEMA} from '../../services/configuration/config_schema.js'; +import {reformatConfig} from '../configuration-components/ReformatHook'; const CONFIG_URL = '/api/agent-configuration'; export const API_PBA_LINUX = '/api/file-upload/PBAlinux'; @@ -71,9 +72,7 @@ class ConfigurePageComponent extends AuthComponent { this.authFetch(CONFIG_URL).then(res => res.json()) .then(monkeyConfig => { let sections = []; - let monkeyConfig = data[0]; - // TODO: Fix when we add plugins - monkeyConfig['payloads'] = monkeyConfig['payloads'][0]['options']; + monkeyConfig = reformatConfig(monkeyConfig); this.setInitialConfig(monkeyConfig); for (let sectionKey of this.getSectionsOrder()) { @@ -110,13 +109,16 @@ class ConfigurePageComponent extends AuthComponent { this.setState({showUnsafeAttackOptionsWarning: false}); } - updateConfig = (callback = null) => { + updateConfig = () => { this.authFetch(CONFIG_URL) .then(res => res.json()) .then(data => { - this.setInitialConfig(data.configuration); - this.setState({configuration: data.configuration, - currentFormData: data.configuration[this.state.selectedSection]}, callback); + data = reformatConfig(data); + this.setInitialConfig(data); + this.setState({ + configuration: data, + currentFormData: data[this.state.selectedSection] + }); }) }; @@ -132,7 +134,7 @@ class ConfigurePageComponent extends AuthComponent { await this.updateConfigSection(); if (this.canSafelySubmitConfig(this.state.configuration)) { this.configSubmit(); - if(this.state.lastAction === configExportAction){ + if (this.state.lastAction === configExportAction) { this.setState({showConfigExportModal: true}) } } else { @@ -145,16 +147,14 @@ class ConfigurePageComponent extends AuthComponent { .then(res => res.json()) .then(res => { this.setState({ - lastAction: configSaveAction, - schema: res.schema, - configuration: res.configuration + lastAction: configSaveAction }); - this.setInitialConfig(res.configuration); + this.setInitialConfig(this.state.configuration); this.props.onStatusChange(); }).catch(error => { - console.log('Bad configuration: ' + error.toString()); - this.setState({lastAction: 'invalid_configuration'}); - }); + console.log('Bad configuration: ' + error.toString()); + this.setState({lastAction: 'invalid_configuration'}); + }); } onChange = ({formData}) => { @@ -187,10 +187,12 @@ class ConfigurePageComponent extends AuthComponent { } onClose = (importSuccessful) => { - if(importSuccessful === true){ + if (importSuccessful === true) { this.updateConfig(); - this.setState({lastAction: 'import_success', - showConfigImportModal: false}); + this.setState({ + lastAction: 'import_success', + showConfigImportModal: false + }); } else { this.setState({showConfigImportModal: false}); @@ -251,8 +253,8 @@ class ConfigurePageComponent extends AuthComponent { } } } catch (TypeError) { - if (JSON.stringify(this.initialConfig[this.currentSection]) === JSON.stringify(this.state.currentFormData)){ - return false; + if (JSON.stringify(this.initialConfig[this.currentSection]) === JSON.stringify(this.state.currentFormData)) { + return false; } } return true; @@ -285,6 +287,7 @@ class ConfigurePageComponent extends AuthComponent { }) .then(res => res.json()) .then(res => { + res.configuration = reformatConfig(res.configuration); this.setState({ lastAction: 'reset', schema: res.schema, @@ -319,12 +322,15 @@ class ConfigurePageComponent extends AuthComponent { }; sendConfig() { + let config = JSON.parse(JSON.stringify(this.state.configuration)) + config = reformatConfig(config, true); + return ( this.authFetch(CONFIG_URL, { method: 'POST', headers: {'Content-Type': 'application/json'}, - body: JSON.stringify(this.state.configuration) + body: JSON.stringify(config) }) .then(res => { if (!res.ok) { @@ -356,8 +362,8 @@ class ConfigurePageComponent extends AuthComponent { formProperties['liveValidate'] = true; applyUiSchemaManipulators(this.state.selectedSection, - formProperties['formData'], - formProperties['uiSchema']); + formProperties['formData'], + formProperties['uiSchema']); return (
From 6725b01342c70b3638ffd9296a9394c80091192b Mon Sep 17 00:00:00 2001 From: vakarisz Date: Fri, 8 Jul 2022 10:58:53 +0300 Subject: [PATCH 04/10] UI: Adjust config page to use new reset endpoint --- .../cc/ui/src/components/pages/ConfigurePage.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js index 1587cc11a..e1016a304 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js @@ -21,6 +21,7 @@ import {SCHEMA} from '../../services/configuration/config_schema.js'; import {reformatConfig} from '../configuration-components/ReformatHook'; const CONFIG_URL = '/api/agent-configuration'; +const RESET_URL = '/api/reset-agent-configuration'; export const API_PBA_LINUX = '/api/file-upload/PBAlinux'; export const API_PBA_WINDOWS = '/api/file-upload/PBAwindows'; @@ -145,7 +146,7 @@ class ConfigurePageComponent extends AuthComponent { configSubmit() { return this.sendConfig() .then(res => res.json()) - .then(res => { + .then(() => { this.setState({ lastAction: configSaveAction }); @@ -279,22 +280,16 @@ class ConfigurePageComponent extends AuthComponent { }; resetConfig = () => { - this.authFetch(CONFIG_URL, + this.authFetch(RESET_URL, { method: 'POST', - headers: {'Content-Type': 'application/json'}, - body: JSON.stringify({'reset': true}) }) .then(res => res.json()) - .then(res => { - res.configuration = reformatConfig(res.configuration); + .then(() => { this.setState({ lastAction: 'reset', - schema: res.schema, - configuration: res.configuration, - currentFormData: res.configuration[this.state.selectedSection] }); - this.setInitialConfig(res.configuration); + this.updateConfig(); this.props.onStatusChange(); } ).then(() => { From 5a52ceaa4c0de48b3284ba976fb852e6ddab13a7 Mon Sep 17 00:00:00 2001 From: vakarisz Date: Fri, 8 Jul 2022 11:24:07 +0300 Subject: [PATCH 05/10] UI: Reset last action on in ConfigurePage.js Last action, like "Configuration was reset successfully" shouldn't linger in the page for long. It should reset upon modifying the configuration or changing the tab --- .../cc/ui/src/components/pages/ConfigurePage.js | 13 ++++++------- .../components/ui-components/AdvancedMultiSelect.js | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js index e1016a304..81dfbfb14 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js @@ -59,6 +59,10 @@ class ConfigurePageComponent extends AuthComponent { } } + resetLastAction = () => { + this.setState({lastAction: 'none'}); + } + getSectionsOrder() { let islandMode = this.props.islandMode !== 'unset' ? this.props.islandMode : 'advanced' return CONFIGURATION_TABS_PER_MODE[islandMode]; @@ -262,13 +266,7 @@ class ConfigurePageComponent extends AuthComponent { } setSelectedSection = (key) => { - - // TODO: Fix https://github.com/guardicore/monkey/issues/1621 - //if ( key === 'basic' & this.userChangedConfig()) { - // this.setState({showUnsubmittedConfigWarning: true}); - // return; - //} - + this.resetLastAction(); this.updateConfigSection(); this.currentSection = key; let selectedSectionData = this.state.configuration[key]; @@ -351,6 +349,7 @@ class ConfigurePageComponent extends AuthComponent { formProperties['fields'] = {DescriptionField: HtmlFieldDescription}; formProperties['formData'] = this.state.currentFormData; formProperties['onChange'] = this.onChange; + formProperties['onFocus'] = this.resetLastAction; formProperties['customFormats'] = formValidationFormats; formProperties['transformErrors'] = transformErrors; formProperties['className'] = 'config-form'; diff --git a/monkey/monkey_island/cc/ui/src/components/ui-components/AdvancedMultiSelect.js b/monkey/monkey_island/cc/ui/src/components/ui-components/AdvancedMultiSelect.js index fbef10235..e0bc667de 100644 --- a/monkey/monkey_island/cc/ui/src/components/ui-components/AdvancedMultiSelect.js +++ b/monkey/monkey_island/cc/ui/src/components/ui-components/AdvancedMultiSelect.js @@ -182,7 +182,7 @@ class AdvancedMultiSelect extends React.Component { } = this.props; return ( -
+
Date: Fri, 8 Jul 2022 12:01:19 +0300 Subject: [PATCH 06/10] UI: Fix error in ConfigurePage.js after refresh of the page --- .../monkey_island/cc/ui/src/components/pages/ConfigurePage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js index 81dfbfb14..85d20c82d 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js @@ -64,7 +64,8 @@ class ConfigurePageComponent extends AuthComponent { } getSectionsOrder() { - let islandMode = this.props.islandMode !== 'unset' ? this.props.islandMode : 'advanced' + let islandModeSet = (this.props.islandMode !== 'unset' && this.props.islandMode !== undefined) + let islandMode = islandModeSet ? this.props.islandMode : 'advanced' return CONFIGURATION_TABS_PER_MODE[islandMode]; } From efe77e2150b07297634c31a0d73170295cf546ba Mon Sep 17 00:00:00 2001 From: vakarisz Date: Fri, 8 Jul 2022 12:12:24 +0300 Subject: [PATCH 07/10] UI: Remove userChangedConfig from ConfigurePage.js Nothing was using this function --- .../cc/ui/src/components/pages/ConfigurePage.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js index 85d20c82d..fa76577d5 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js @@ -250,22 +250,6 @@ class ConfigurePageComponent extends AuthComponent { ); } - userChangedConfig() { - try { - if (JSON.stringify(this.state.configuration) === JSON.stringify(this.initialConfig)) { - if (Object.keys(this.state.currentFormData).length === 0 || - JSON.stringify(this.initialConfig[this.currentSection]) === JSON.stringify(this.state.currentFormData)) { - return false; - } - } - } catch (TypeError) { - if (JSON.stringify(this.initialConfig[this.currentSection]) === JSON.stringify(this.state.currentFormData)) { - return false; - } - } - return true; - } - setSelectedSection = (key) => { this.resetLastAction(); this.updateConfigSection(); From bac091f185b2e13a8b48dc2ab688c737ccd00fc6 Mon Sep 17 00:00:00 2001 From: vakarisz Date: Fri, 8 Jul 2022 12:14:22 +0300 Subject: [PATCH 08/10] UI: Remove renderAttackAlertModal from ConfigurePage.js Nothing was using this function --- .../ui/src/components/pages/ConfigurePage.js | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js index fa76577d5..dc42c996c 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js @@ -46,7 +46,6 @@ class ConfigurePageComponent extends AuthComponent { selectedSection: this.currentSection, showUnsubmittedConfigWarning: false, showUnsafeOptionsConfirmation: false, - showUnsafeAttackOptionsWarning: false, showConfigExportModal: false, showConfigImportModal: false }; @@ -205,32 +204,6 @@ class ConfigurePageComponent extends AuthComponent { } } - renderAttackAlertModal = () => { - return ( { - this.setState({showUnsubmittedConfigWarning: false}) - }}> - -

-
Warning
-

-

- You have unsubmitted changes. Submit them before proceeding. -

-
- -
-
-
) - }; - renderUnsafeOptionsConfirmationModal() { return ( {this.renderConfigExportModal()} {this.renderConfigImportModal()} - {this.renderAttackAlertModal()} {this.renderUnsafeOptionsConfirmationModal()} {this.renderUnsafeAttackOptionsWarningModal()}

Monkey Configuration

From 50540da780e9010c0b7114c6210b82f4ce2dc2a6 Mon Sep 17 00:00:00 2001 From: vakarisz Date: Fri, 8 Jul 2022 12:16:30 +0300 Subject: [PATCH 09/10] UI: Remove renderUnsafeAttackOptionsWarningModal from ConfigurePage Nothing was using this function --- .../cc/ui/src/components/pages/ConfigurePage.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js index dc42c996c..872e642c5 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js @@ -44,7 +44,6 @@ class ConfigurePageComponent extends AuthComponent { schema: {}, sections: [], selectedSection: this.currentSection, - showUnsubmittedConfigWarning: false, showUnsafeOptionsConfirmation: false, showConfigExportModal: false, showConfigImportModal: false @@ -214,15 +213,6 @@ class ConfigurePageComponent extends AuthComponent { ); } - renderUnsafeAttackOptionsWarningModal() { - return ( - - ); - } - setSelectedSection = (key) => { this.resetLastAction(); this.updateConfigSection(); @@ -376,7 +366,6 @@ class ConfigurePageComponent extends AuthComponent { {this.renderConfigExportModal()} {this.renderConfigImportModal()} {this.renderUnsafeOptionsConfirmationModal()} - {this.renderUnsafeAttackOptionsWarningModal()}

Monkey Configuration

{this.renderNav()} {content} From fde719ce94590272b92f3005724b507c6e3f853f Mon Sep 17 00:00:00 2001 From: vakarisz Date: Fri, 8 Jul 2022 14:41:24 +0300 Subject: [PATCH 10/10] UI: Remove last unused method, improve style --- .../cc/ui/src/components/pages/ConfigurePage.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js index 872e642c5..154eff52c 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js @@ -1,6 +1,6 @@ import React from 'react'; import Form from 'react-jsonschema-form-bs4'; -import {Button, Col, Modal, Nav} from 'react-bootstrap'; +import {Col, Nav} from 'react-bootstrap'; import AuthComponent from '../AuthComponent'; import UiSchema from '../configuration-components/UiSchema'; import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; @@ -10,7 +10,6 @@ import {formValidationFormats} from '../configuration-components/ValidationForma import transformErrors from '../configuration-components/ValidationErrorMessages'; import UnsafeConfigOptionsConfirmationModal from '../configuration-components/UnsafeConfigOptionsConfirmationModal.js'; -import UnsafeOptionsWarningModal from '../configuration-components/UnsafeOptionsWarningModal.js'; import isUnsafeOptionSelected from '../utils/SafeOptionValidator.js'; import ConfigExportModal from '../configuration-components/ExportConfigModal'; import ConfigImportModal from '../configuration-components/ImportConfigModal'; @@ -109,10 +108,6 @@ class ConfigurePageComponent extends AuthComponent { } } - onUnsafeAttackContinueClick = () => { - this.setState({showUnsafeAttackOptionsWarning: false}); - } - updateConfig = () => { this.authFetch(CONFIG_URL) .then(res => res.json()) @@ -228,12 +223,12 @@ class ConfigurePageComponent extends AuthComponent { resetConfig = () => { this.authFetch(RESET_URL, { - method: 'POST', + method: 'POST' }) .then(res => res.json()) .then(() => { this.setState({ - lastAction: 'reset', + lastAction: 'reset' }); this.updateConfig(); this.props.onStatusChange();