mirror of
https://github.com/zoriya/flood.git
synced 2026-06-07 12:24:50 +00:00
RTorrentConnectionSettingsForm: discourage TCP connection type
This commit is contained in:
+28
-19
@@ -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 (
|
||||
<FormRow>
|
||||
<Textbox
|
||||
onChange={(e) => this.handleFormChange(e, 'host')}
|
||||
id="host"
|
||||
label={<FormattedMessage id="connection.settings.rtorrent.host" />}
|
||||
placeholder={intl.formatMessage({
|
||||
id: 'connection.settings.rtorrent.host.input.placeholder',
|
||||
})}
|
||||
/>
|
||||
<Textbox
|
||||
onChange={(e) => this.handleFormChange(e, 'port')}
|
||||
id="port"
|
||||
label={<FormattedMessage id="connection.settings.rtorrent.port" />}
|
||||
placeholder={intl.formatMessage({
|
||||
id: 'connection.settings.rtorrent.port.input.placeholder',
|
||||
})}
|
||||
/>
|
||||
</FormRow>
|
||||
<FormRowGroup>
|
||||
<FormRow>
|
||||
<FormError>
|
||||
{intl.formatMessage({
|
||||
id: 'connection.settings.rtorrent.type.tcp.warning',
|
||||
})}
|
||||
</FormError>
|
||||
</FormRow>
|
||||
<FormRow>
|
||||
<Textbox
|
||||
onChange={(e) => this.handleFormChange(e, 'host')}
|
||||
id="host"
|
||||
label={<FormattedMessage id="connection.settings.rtorrent.host" />}
|
||||
placeholder={intl.formatMessage({
|
||||
id: 'connection.settings.rtorrent.host.input.placeholder',
|
||||
})}
|
||||
/>
|
||||
<Textbox
|
||||
onChange={(e) => this.handleFormChange(e, 'port')}
|
||||
id="port"
|
||||
label={<FormattedMessage id="connection.settings.rtorrent.port" />}
|
||||
placeholder={intl.formatMessage({
|
||||
id: 'connection.settings.rtorrent.port.input.placeholder',
|
||||
})}
|
||||
/>
|
||||
</FormRow>
|
||||
</FormRowGroup>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user