sec: nuke ftp request support
authorClinton Ebadi <clinton@unknownlamer.org>
Sat, 7 Feb 2015 19:49:07 +0000 (14:49 -0500)
committerClinton Ebadi <clinton@unknownlamer.org>
Sat, 7 Feb 2015 21:02:11 +0000 (16:02 -0500)
We haven't supported ftp for ages and there's no reason to in the
future (it was effectively unused, because sftp).

sec.mlt
sec.sig
sec.sml

diff --git a/sec.mlt b/sec.mlt
index f29c9fd..e48049a 100644 (file)
--- a/sec.mlt
+++ b/sec.mlt
@@ -13,7 +13,6 @@ val uname = case $"uname" of
 val socks = Sec.socketPerms {node = nodeNum, uname = uname};
 val tpe = Sec.isTpe {node = nodeNum, uname = uname};
 val cron = Sec.cronAllowed {node = nodeNum, uname = uname};
-val ftp = Sec.ftpAllowed {node = nodeNum, uname = uname};
 
 ref showNormal = true;
 
@@ -55,20 +54,6 @@ elseif $"cmd" = "cron2" then
                %><h3>Error sending e-mail notification</h3><%
        end
        %><h3>Request added</h3><%
-
-elseif $"cmd" = "ftp" then
-       showNormal := false;
-       val ftp = iff $"ftp" = "yes" then "enabled" else "disabled";
-       %>Are you sure you want to request that FTP permissions for <b><% Web.html uname %></b> on <b><% Web.html nodeName %></b> be <b><% ftp %></b>?<br>
-       <a href="sec?cmd=ftp2&node=<% nodeNum %>&uname=<% Web.urlEncode uname %>&ftp=<% ftp %>&msg=<% Web.urlEncode ($"msg") %>">Yes, place the request!</a><%
-elseif $"cmd" = "ftp2" then
-       val ftp = iff $"ftp" = "enabled" then "enable" else "disable";
-       val id = Sec.Req.add {usr = you, node = nodeNum, data = String.concat [uname, ": ", ftp, " FTP access"], msg = $"msg"};
-       if not (Sec.Req.notifyNew id) then
-               %><h3>Error sending e-mail notification</h3><%
-       end
-       %><h3>Request added</h3><%
-
 elseif $"cmd" = "rule" then
        showNormal := false;
        val rule = $"rule";
@@ -301,24 +286,6 @@ if showNormal then %>
 </table>
 </form>
 
-<h3>Request change to your FTP permissions</h3>
-
-<p>Please read <a href="http://wiki.hcoop.net/wiki/FileTransfer">our wiki instructions on file transfer</a> before requesting FTP access. Almost everyone should use alternative protocols to FTP that provide superior security benefits.</p>
-
-<form action="sec" method="post">
-<input type="hidden" name="node" value="<% nodeNum %>">
-<input type="hidden" name="uname" value="<% uname %>">
-<input type="hidden" name="cmd" value="ftp">
-<table class="blanks">
-<tr> <td>Allowed to use FTP?</td> <td><select name="ftp">
-       <option value="no"<% if not ftp then %> selected<% end %>>No</option>
-       <option value="yes"<% if ftp then %> selected<% end %>>Yes</option>
-</select></td> </tr>
-<tr> <td>Reason:</td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
-<tr> <td><input type="submit" value="Request"></td> </tr>
-</table>
-</form>
-
 <% val rules = Sec.findFirewallRules {node = nodeNum, uname = uname};
 switch rules of
   _::_ => %>
diff --git a/sec.sig b/sec.sig
index c88ded1..1acd93f 100644 (file)
--- a/sec.sig
+++ b/sec.sig
@@ -12,7 +12,6 @@ signature SEC = sig
     val socketPerms : {node : int, uname : string} -> socket_perms
     val isTpe : {node : int, uname : string} -> bool
     val cronAllowed : {node : int, uname : string} -> bool
-    val ftpAllowed : {node : int, uname : string} -> bool
 
     val findFirewallRules : {node : int, uname : string} -> string list
 
diff --git a/sec.sml b/sec.sml
index 2d53ef3..81ececa 100644 (file)
--- a/sec.sml
+++ b/sec.sml
@@ -70,7 +70,6 @@ fun checkIt cmd {node, uname} =
 
 val isTpe = checkIt "tpe"
 val cronAllowed = checkIt "cron"
-val ftpAllowed = checkIt "ftp"
 
 fun findFirewallRules {node, uname} =
     let