Merge pull request #443 from fabianfrz/tor_contactinfo

security/tor: fix a bug in tor model; Add ContactInfo to tor relay;
This commit is contained in:
Fabian Franz, BSc
2017-12-22 18:39:22 +01:00
committed by GitHub
4 changed files with 15 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
PLUGIN_NAME= tor
PLUGIN_VERSION= 1.3
PLUGIN_VERSION= 1.4
PLUGIN_COMMENT= The Onion Router
PLUGIN_DEPENDS= tor ruby
PLUGIN_MAINTAINER= franz.fabian.94@gmail.com
@@ -28,6 +28,12 @@
<type>text</type>
<help>This may only consist of characters and numbers and is used to identifiy your host.</help>
</field>
<field>
<id>relay.contact_info</id>
<label>Contact Info</label>
<type>text</type>
<help>You can enter a publicly visible (obfuscated) email address into this field to allow other users to notify you if there are issues with your relay.</help>
</field>
<field>
<id>relay.bandwithrate</id>
<label>Bandwith Rate</label>
@@ -29,11 +29,14 @@
<mask>/^[a-z0-9.-]+$/i</mask>
</address>
<nick type="TextField">
<mask>/^.+$/</mask>
<Required>N</Required>
<!-- by docs -->
<mask>/^[a-zA-Z0-9]+$/</mask>
</nick>
<contact_info type="TextField">
<Required>N</Required>
<mask><![CDATA[/^[a-zA-Z0-9 !§$%\/\(\)\\@,;.:_\-#+~*\?&<>]+$/]]></mask>
</contact_info>
<bandwithrate type="IntegerField">
<Required>N</Required>
</bandwithrate>
@@ -145,6 +145,10 @@ Address {{ OPNsense.tor.relay.address }}
Nickname {{ OPNsense.tor.relay.nick }}
{% endif %}
{% if helpers.exists('OPNsense.tor.relay.contact_info') and OPNsense.tor.relay.contact_info != '' %}
ContactInfo {{ OPNsense.tor.relay.contact_info }}
{% endif %}
{% if helpers.exists('OPNsense.tor.relay.bandwithrate') and OPNsense.tor.relay.bandwithrate != '' %}
RelayBandwidthRate {{ OPNsense.tor.relay.bandwithrate }} KBytes
{% endif %}