Author: locilka
Date: Thu Jan 6 14:35:21 2011
New Revision: 63112
URL: http://svn.opensuse.org/viewcvs/yast?rev=63112&view=rev
Log:
Implemented less strict TXT record check (BNC #620480).
Modified:
trunk/dns-server/VERSION
trunk/dns-server/package/yast2-dns-server.changes
trunk/dns-server/src/dialog-masterzone.ycp
Modified: trunk/dns-server/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/dns-server/VERSION?rev=63112&r1=63111&r2=63112&view=diff
==============================================================================
--- trunk/dns-server/VERSION (original)
+++ trunk/dns-server/VERSION Thu Jan 6 14:35:21 2011
@@ -1 +1 @@
-2.18.3
+2.20.1
Modified: trunk/dns-server/package/yast2-dns-server.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/dns-server/package/yast2-dns-server.changes?rev=63112&r1=63111&r2=63112&view=diff
==============================================================================
--- trunk/dns-server/package/yast2-dns-server.changes (original)
+++ trunk/dns-server/package/yast2-dns-server.changes Thu Jan 6 14:35:21 2011
@@ -1,4 +1,10 @@
------------------------------------------------------------------
+Thu Jan 6 14:17:25 CET 2011 - locilka@suse.cz
+
+- Implemented less strict TXT record check (BNC #620480).
+- 2.20.1
+
+------------------------------------------------------------------
Wed Jan 13 18:56:03 CET 2010 - kmachalkova@suse.cz
- Adjusted .desktop file(s) to wrap /sbin/yast2/ calls in xdg-su
Modified: trunk/dns-server/src/dialog-masterzone.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/dns-server/src/dialog-masterzone.ycp?rev=63112&r1=63111&r2=63112&view=diff
==============================================================================
--- trunk/dns-server/src/dialog-masterzone.ycp (original)
+++ trunk/dns-server/src/dialog-masterzone.ycp Thu Jan 6 14:35:21 2011
@@ -1308,6 +1308,31 @@
}
/**
+ * Checks whether a given string is a valid TXT record key (name)
+ */
+boolean ValidTXTRecordName (string name) {
+ // Checking the length
+ if (name == nil || name == "") {
+ y2warning ("TXT record key must not be empty");
+ return false;
+ }
+
+ // Checking for forbidden '='
+ if (regexpmatch(name, "=")) {
+ y2warning ("TXT record key %1 must not contain a '=' character.", name);
+ return false;
+ }
+
+ // only US-ASCII characters are allowed
+ if (size(name) != size(toascii(name))) {
+ y2warning ("TXT record key %1 contains some non US-ASCII characters", name);
+ return false;
+ }
+
+ return true;
+}
+
+/**
* Checking new record by the "type"
*/
boolean CheckNewZoneRecordSyntax (map