From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 323923d912cb86fd2e89326aa61bad06bf05d6dd
Date: Wed, 05 Mar 2014 13:59:57 +0100 [thread overview]
Message-ID: <20140305125958.5F18020ACF@argus.ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 2096 bytes --]
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".
The branch, next has been updated
via 323923d912cb86fd2e89326aa61bad06bf05d6dd (commit)
from 32c6ebdced9682fdbdbe54059de25a036557d3b0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 323923d912cb86fd2e89326aa61bad06bf05d6dd
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Mar 5 13:59:28 2014 +0100
firewall: Allow remarks in Unicode.
-----------------------------------------------------------------------
Summary of changes:
html/cgi-bin/firewall.cgi | 13 +++++++++++++
1 file changed, 13 insertions(+)
Difference in files:
diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi
index e633b3c..7bcb079 100644
--- a/html/cgi-bin/firewall.cgi
+++ b/html/cgi-bin/firewall.cgi
@@ -21,7 +21,11 @@
use strict;
use Sort::Naturally;
+use utf8;
+use feature 'unicode_strings';
+
no warnings 'uninitialized';
+
# enable only the following on debugging purpose
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
@@ -2142,6 +2146,7 @@ sub saverule
#print"6";
}
$fwdfwsettings{'ruleremark'}=~ s/,/;/g;
+ utf8::decode($fwdfwsettings{'ruleremark'});
$fwdfwsettings{'ruleremark'}=&Header::escape($fwdfwsettings{'ruleremark'});
if ($fwdfwsettings{'updatefwrule'} ne 'on'){
my $key = &General::findhasharraykey ($hash);
@@ -2279,6 +2284,14 @@ sub validremark
{
# Checks a hostname against RFC1035
my $remark = $_[0];
+
+ # Try to decode $remark into UTF-8. If this doesn't work,
+ # we assume that the string it not sane.
+ if (!utf8::decode($remark)) {
+ return 0;
+ }
+
+ # Check if the string only contains of printable characters.
if ($remark =~ /^[[:print:]]*$/) {
return 1;
}
hooks/post-receive
--
IPFire 2.x development tree
reply other threads:[~2014-03-05 12:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140305125958.5F18020ACF@argus.ipfire.org \
--to=git@ipfire.org \
--cc=ipfire-scm@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox