Fixed bugs that broke the file manager under the new Webmin API module.
---- Changes since 1.470 ----
Fixed a bug that prevented setuid and setgid permissions from being changed.
+---- Changes since 1.510 ----
+Bug fixes to allow the File Manager module to be used via Webmin Servers Index or Cloudmin.
// Full session cookie
String session;
+ // HTTP referer
+ String referer;
+
// Archive parameter
String archive;
}
trust = getParameter("trust");
session = getParameter("session");
+ referer = getDocumentBase().toString();
extra = getParameter("extra");
if (extra == null) extra = "";
images = getParameter("images");
{
if (session != null)
conn.setRequestProperty("Cookie", session);
+ conn.setRequestProperty("Referer", referer);
}
// Fill the multicolumn list with files from some directory
# link.cgi
# Forward the URL from path_info on to another webmin server
+if ($ENV{'PATH_INFO'} =~ /^\/(\d+)\/([a-zA-Z0-9\-\/]+)\.(jar|class|gif|png)$/) {
+ # Allow fetches of Java classes and images without a referer header,
+ # as Java sometimes doesn't provide these
+ $trust_unknown_referers = 1;
+ }
require './servers-lib.pl';
$ENV{'PATH_INFO'} =~ /^\/(\d+)(.*)$/ ||
&error("Bad PATH_INFO : $ENV{'PATH_INFO'}");