diff --git a/client/src/javascript/components/general/connection-settings/RTorrentConnectionSettingsForm.tsx b/client/src/javascript/components/general/connection-settings/RTorrentConnectionSettingsForm.tsx index 245e3ace..62adf794 100644 --- a/client/src/javascript/components/general/connection-settings/RTorrentConnectionSettingsForm.tsx +++ b/client/src/javascript/components/general/connection-settings/RTorrentConnectionSettingsForm.tsx @@ -7,7 +7,7 @@ import type { RTorrentTCPConnectionSettings, } from '@shared/schema/ClientConnectionSettings'; -import {FormGroup, FormRow, Radio, Textbox} from '../../../ui'; +import {FormError, FormGroup, FormRow, FormRowGroup, Radio, Textbox} from '../../../ui'; export interface RTorrentConnectionSettingsProps { intl: IntlShape; @@ -94,24 +94,33 @@ class RTorrentConnectionSettingsForm extends React.Component< if (type === 'tcp') { return ( - - this.handleFormChange(e, 'host')} - id="host" - label={} - placeholder={intl.formatMessage({ - id: 'connection.settings.rtorrent.host.input.placeholder', - })} - /> - this.handleFormChange(e, 'port')} - id="port" - label={} - placeholder={intl.formatMessage({ - id: 'connection.settings.rtorrent.port.input.placeholder', - })} - /> - + + + + {intl.formatMessage({ + id: 'connection.settings.rtorrent.type.tcp.warning', + })} + + + + this.handleFormChange(e, 'host')} + id="host" + label={} + placeholder={intl.formatMessage({ + id: 'connection.settings.rtorrent.host.input.placeholder', + })} + /> + this.handleFormChange(e, 'port')} + id="port" + label={} + placeholder={intl.formatMessage({ + id: 'connection.settings.rtorrent.port.input.placeholder', + })} + /> + + ); } diff --git a/client/src/javascript/i18n/strings.compiled.json b/client/src/javascript/i18n/strings.compiled.json index d8485852..ad544d55 100644 --- a/client/src/javascript/i18n/strings.compiled.json +++ b/client/src/javascript/i18n/strings.compiled.json @@ -575,6 +575,12 @@ "value": "TCP" } ], + "connection.settings.rtorrent.type.tcp.warning": [ + { + "type": 0, + "value": "Exposing rTorrent via TCP may allow privilege escalation." + } + ], "connectivity.modal.content": [ { "type": 0, diff --git a/client/src/javascript/i18n/strings.json b/client/src/javascript/i18n/strings.json index 22f57d83..898f0958 100644 --- a/client/src/javascript/i18n/strings.json +++ b/client/src/javascript/i18n/strings.json @@ -41,6 +41,7 @@ "connection.settings.rtorrent": "rTorrent", "connection.settings.rtorrent.type": "Connection Type", "connection.settings.rtorrent.type.tcp": "TCP", + "connection.settings.rtorrent.type.tcp.warning": "Exposing rTorrent via TCP may allow privilege escalation.", "connection.settings.rtorrent.type.socket": "Socket", "connection.settings.rtorrent.host": "Host", "connection.settings.rtorrent.host.input.placeholder": "Hostname or IP",