Don't re-enable referers_none when upgrading
authorJamie Cameron <jcameron@webmin.com>
Thu, 14 Feb 2008 08:17:29 +0000 (08:17 +0000)
committerJamie Cameron <jcameron@webmin.com>
Thu, 14 Feb 2008 08:17:29 +0000 (08:17 +0000)
lang/en
webmin/change_referers.cgi

diff --git a/lang/en b/lang/en
index 67a74f1..7bd93ba 100644 (file)
--- a/lang/en
+++ b/lang/en
@@ -119,7 +119,7 @@ referer_warn_unknown=<b>Warning!</b> Webmin has detected that the program $1 was
 referer_fix1=If this is a legitimate link, you can allow links from this URL as follows :<ul><li>Login to Webmin normally.<li>Go to the <b>Webmin Configuration</b> module.<li>Click on the Trusted Referrers icon.<li>Enter the hostname $1 into the <b>Trusted websites</b> field, and click <b>Save</b>.</ul>
 referer_fix2=Alternately, you can configure Webmin to allow this link from the command line by :<ul><li>Login as <tt>root</tt>, and edit the <tt>/etc/webmin/config</tt> file.<li>Add the line <tt>referers=$1</tt> at the end, or if a <tt>referers</tt> line already exists add <tt>$1</tt> to it.<li>Save the file.</ul>
 referer_fix1u=If your browser does not send the <tt>Referer</tt> header needed, you can turn off this check as follows :<ul><li>Login to Webmin normally.<li>Go to the <b>Webmin Configuration</b> module.<li>Click on the Trusted Referrers icon.<li>Check the <b>Trust links from unknown referrers</b> box, and click <b>Save</b>.</ul>
-referer_fix2u=Alternately, you can configure Webmin to allow links from unknown referers by :<ul><li>Login as <tt>root</tt>, and edit the <tt>/etc/webmin/config</tt> file.<li>Find the line <tt>referers_none=1</tt> and remove it.<li>Save the file.</ul>
+referer_fix2u=Alternately, you can configure Webmin to allow links from unknown referers by :<ul><li>Login as <tt>root</tt>, and edit the <tt>/etc/webmin/config</tt> file.<li>Find the line <tt>referers_none=1</tt> and change it to <tt>referers_none=0</tt>.<li>Save the file.</ul>
 
 session_header=Login to Webmin
 session_mesg=You must enter a username and password to login to the Webmin server on $1.
index 7646afa..ed7130c 100755 (executable)
@@ -13,7 +13,7 @@ foreach my $r (@refs) {
        $r =~ /^[a-z0-9\.\-\_]+$/ || &error(&text('referers_ehost', $r));
        }
 $gconfig{'referers'} = join(" ", @refs);
-$gconfig{'referers_none'} = !$in{'referers_none'};
+$gconfig{'referers_none'} = int(!$in{'referers_none'});
 &write_file("$config_directory/config", \%gconfig);
 &unlock_file("$config_directory/config");
 &webmin_log('referers', undef, undef, \%in);