[yast-commit] r42677 - in /branches/SuSE-SLE-10-SP2-Branch/http-server: VERSION package/yast2-http-server.changes src/HttpServerWidgets.ycp
Author: mzugec Date: Tue Dec 4 18:22:53 2007 New Revision: 42677 URL: http://svn.opensuse.org/viewcvs/yast?rev=42677&view=rev Log: into IP addresses include also IPs from dhcp interfaces improved vhost validation for name-based vhost (#342844) Modified: branches/SuSE-SLE-10-SP2-Branch/http-server/VERSION branches/SuSE-SLE-10-SP2-Branch/http-server/package/yast2-http-server.changes branches/SuSE-SLE-10-SP2-Branch/http-server/src/HttpServerWidgets.ycp Modified: branches/SuSE-SLE-10-SP2-Branch/http-server/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/http-server/VERSION?rev=42677&r1=42676&r2=42677&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP2-Branch/http-server/VERSION (original) +++ branches/SuSE-SLE-10-SP2-Branch/http-server/VERSION Tue Dec 4 18:22:53 2007 @@ -1 +1 @@ -2.13.28 +2.13.29 Modified: branches/SuSE-SLE-10-SP2-Branch/http-server/package/yast2-http-server.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/http-server/package/yast2-http-server.changes?rev=42677&r1=42676&r2=42677&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP2-Branch/http-server/package/yast2-http-server.changes (original) +++ branches/SuSE-SLE-10-SP2-Branch/http-server/package/yast2-http-server.changes Tue Dec 4 18:22:53 2007 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Dec 4 18:22:19 CET 2007 - mzugec@suse.cz + +- into IP addresses include also IPs from dhcp interfaces +- improved vhost validation for name-based vhost (#342844) +- 2.13.29 + +------------------------------------------------------------------- Wed Nov 21 16:58:26 CET 2007 - mzugec@suse.cz - mark texts in HTTPDModules.pm to translation (#181133) Modified: branches/SuSE-SLE-10-SP2-Branch/http-server/src/HttpServerWidgets.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/http-server/src/HttpServerWidgets.ycp?rev=42677&r1=42676&r2=42677&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP2-Branch/http-server/src/HttpServerWidgets.ycp (original) +++ branches/SuSE-SLE-10-SP2-Branch/http-server/src/HttpServerWidgets.ycp Tue Dec 4 18:22:53 2007 @@ -1017,8 +1017,6 @@ if (! validate_servername(servername)) return false; -// if (! validate_serverip("", "ipaddress", nil)) return false; - if ( size(admin) == 0 ) { // translators: error popup @@ -1106,6 +1104,30 @@ return nil; } +global boolean validateVhostRes(string key, map event) ``{ + string vhost=(string)UI::QueryWidget(`id( `virtual_host ), `Value); + if (size(vhost)==0) { + Popup::Error(_("Name for VirtualHost ID can't be empty.")); + return false; + } + + // for name-based vhost only IP address is allowed + // or regexp (* or *:port) or list of IP addresses + if (UI::QueryWidget(`resolution, `Value)==`name_based) { + // regexp matches '*' and '*:80' + if (regexpmatch(vhost, "^\\*$\|^\\*:[[:digit:]]\+$")) return true; + boolean ok=true; + foreach(string ip, splitstring(vhost, " "), { + if (!IP::Check4(ip)) ok=false; + }); + if (!ok) Popup::Warning(_("To use name-based virtual hosting, +you must designate the IP address on the server +that will be accepting requests for the hosts. +Also * for all addresses and *:port are acceptable.")); + return ok; + } + return true; +} string dns_zone = ""; @@ -1583,6 +1605,8 @@ ))), "init" : initVhostRes, "handle" : handleVhostRest, + "validate_type" : `function, + "validate_function" : validateVhostRes, "help" : HELPS["vhost_res"]:"" ], "vhost_details" : $[ -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
mzugec@svn.opensuse.org