gui: Restrict GUI listening ports to >1024, add help (fixes #4020)
This adds a pattern validator to the GUI listen port field that checks for port numbers 1024 and above. Also adds a help link pointing to the (new) page talking about GUI listen port numbers. That page has information on how to work around the restriction, in general terms. Also changes the header from "GUI Listen Addresses" to the singular version, because we only support one listen address today. GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4116
This commit is contained in:
committed by
Audrius Butkevicius
parent
7f5e236dd7
commit
26654df48c
@@ -100,9 +100,12 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label translate for="Address">GUI Listen Addresses</label>
|
||||
<input id="Address" class="form-control" type="text" ng-model="tmpGUI.address">
|
||||
<div class="form-group" ng-class="{'has-error': settingsEditor.Address.$invalid && settingsEditor.Address.$dirty}">
|
||||
<label translate for="Address">GUI Listen Address</label> <a href="https://docs.syncthing.net/users/guilisten.html" target="_blank"><span class="fa fa-fw fa-book"></span> <span translate>Help</span></a>
|
||||
<input id="Address" name="Address" class="form-control" type="text" ng-model="tmpGUI.address" ng-pattern="/.*:0*((102[4-9])|(10[3-9][0-9])|(1[1-9][0-9][0-9])|([2-9][0-9][0-9][0-9])|([1-6]\d{4}))$/">
|
||||
<p class="help-block" ng-show="settingsEditor.Address.$invalid" translate>
|
||||
Enter a non-privileged port number (1024 - 65535).
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label translate for="User">GUI Authentication User</label>
|
||||
|
||||
Reference in New Issue
Block a user