diff options
-rw-r--r-- | config/dnsblacklist/dnsblacklist.tmp | 9 | ||||
-rw-r--r-- | config/dnsblacklist/dnsblacklist.xml | 2 | ||||
-rwxr-xr-x | pkg_config.7.xml | 5 |
3 files changed, 11 insertions, 5 deletions
diff --git a/config/dnsblacklist/dnsblacklist.tmp b/config/dnsblacklist/dnsblacklist.tmp index 6f80bc00..4edf4683 100644 --- a/config/dnsblacklist/dnsblacklist.tmp +++ b/config/dnsblacklist/dnsblacklist.tmp @@ -55,6 +55,9 @@ //}
if (count($_POST)>0) {
+
+ conf_mount_rw();
+
$dnsmasqfile = "/usr/local/etc/dnsmasq.conf";
$targetfile = "/usr/local/etc/dnsmasq.blacklist.conf";
$includestring = "conf-file=/usr/local/etc/dnsmasq.blacklist.conf";
@@ -104,7 +107,10 @@ if (count($_POST)>0) { $fh2 = fopen($targetfile, 'a');
$fh = fopen($blackfile,'r');
while($line=fgets($fh)) {
- fwrite($fh2, "address=/" .trim($line). "/74.125.45.100". "\n");
+ //remove all characters other than alpha numeric period and dash
+ preg_match("/([a-zA-Z0-9.-]*)/i", $line, $arraymatches);
+ $line = $arraymatches[1];
+ fwrite($fh2, "address=/" .$line. "/74.125.45.100". "\n");
}
fclose($fh);
fclose($fh2);
@@ -115,6 +121,7 @@ if (count($_POST)>0) { services_dnsmasq_configure();
sleep(1);
$savemsg_dnsb = "DNS Blacklist settings have been saved. Restart dnsmasq service under 'Status' then 'Services' to make the settings active.";
+ conf_mount_ro();
}
?>
diff --git a/config/dnsblacklist/dnsblacklist.xml b/config/dnsblacklist/dnsblacklist.xml index b40e2c05..9082191c 100644 --- a/config/dnsblacklist/dnsblacklist.xml +++ b/config/dnsblacklist/dnsblacklist.xml @@ -41,7 +41,7 @@ <requirements>Describe your package requirements here</requirements> <faq>Currently there are no FAQ items provided.</faq> <name>DNS Blacklist Settings</name> - <version>0.1</version> + <version>0.2</version> <title>Settings</title> <include_file>/usr/local/pkg/dnsblacklist.inc</include_file> <menu> diff --git a/pkg_config.7.xml b/pkg_config.7.xml index fa13111b..2556a471 100755 --- a/pkg_config.7.xml +++ b/pkg_config.7.xml @@ -91,8 +91,7 @@ <pkginfolink>http://doc.pfsense.org/index.php/Pubkey_package</pkginfolink> <config_file>http://www.pfsense.org/packages/config/pubkey.xml</config_file> <configurationfile>pubkey.xml</configurationfile> - <after_install_info>The pfSense release key has been updated.</after_install_info> - <noembedded>true</noembedded> + <after_install_info>The pfSense release key has been updated.</after_install_info> </package> <package> <name>Dashboard</name> @@ -239,7 +238,7 @@ <pkginfolink></pkginfolink> <config_file>http://www.pfsense.com/packages/config/dnsblacklist/dnsblacklist.xml</config_file> <depends_on_package_base_url>http://files.pfsense.org/packages/7/All/</depends_on_package_base_url> - <version>0.1</version> + <version>0.2</version> <status>Beta</status> <required_version>1.2.2</required_version> <maintainer>markjcrane@gmail.com</maintainer> |