[yast-commit] r67533 - in /trunk/network: VERSION package/yast2-network.changes src/clients/proxy.ycp src/clients/save_network.ycp src/services/proxy.ycp testsuite/tests/runtime.ycp
![](https://seccdn.libravatar.org/avatar/0d49ebd5540a31d182254784bcdfaac7.jpg?s=120&d=mm&r=g)
Author: mfilka Date: Thu Feb 23 11:37:07 2012 New Revision: 67533 URL: http://svn.opensuse.org/viewcvs/yast?rev=67533&view=rev Log: - added popup with security question when proxy url contains password (http://usr:pass@proxy) - bnc 694582 - fixed testsuite - 2.22.3 Modified: trunk/network/VERSION trunk/network/package/yast2-network.changes trunk/network/src/clients/proxy.ycp trunk/network/src/clients/save_network.ycp trunk/network/src/services/proxy.ycp trunk/network/testsuite/tests/runtime.ycp Modified: trunk/network/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/VERSION?rev=67533&r1=6753... ============================================================================== --- trunk/network/VERSION (original) +++ trunk/network/VERSION Thu Feb 23 11:37:07 2012 @@ -1 +1 @@ -2.22.2 +2.22.3 Modified: trunk/network/package/yast2-network.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/package/yast2-network.cha... ============================================================================== --- trunk/network/package/yast2-network.changes (original) +++ trunk/network/package/yast2-network.changes Thu Feb 23 11:37:07 2012 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Feb 23 08:52:06 UTC 2012 - mfilka@suse.com + +- added popup with security question when proxy url contains password (http://usr:pass@proxy) - bnc 694582 +- fixed testsuite +- 2.22.3 + +------------------------------------------------------------------- Tue Jan 31 17:36:27 CET 2012 - mvidner@suse.cz - Simplified NetworkStorage::isDiskOnNetwork, thx locilka (bnc#726057#c12) Modified: trunk/network/src/clients/proxy.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/clients/proxy.ycp?rev... ============================================================================== --- trunk/network/src/clients/proxy.ycp (original) +++ trunk/network/src/clients/proxy.ycp Thu Feb 23 11:37:07 2012 @@ -44,10 +44,10 @@ /* main ui function */ any ret = ProxyMainDialog(true); y2debug("ret == %1", ret); - + if (ret == `next && Modified ()) Proxy::Write(); - + UI::CloseDialog(); return ret; Modified: trunk/network/src/clients/save_network.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/clients/save_network.... ============================================================================== --- trunk/network/src/clients/save_network.ycp (original) +++ trunk/network/src/clients/save_network.ycp Thu Feb 23 11:37:07 2012 @@ -45,14 +45,14 @@ * @return true on success */ define boolean ReadInstallInfItem(path install_inf, string item, string var) { - if(item == nil || item == "" || var == nil || var == "") + if(item == nil || item == "" || var == nil || var == "") return false; string val = (string) SCR::Read(add(install_inf, var)); - if(val == nil) + if(val == nil) return false; - if(val != "") + if(val != "") InstallInf[item] = val; return true; Modified: trunk/network/src/services/proxy.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/services/proxy.ycp?re... ============================================================================== --- trunk/network/src/services/proxy.ycp (original) +++ trunk/network/src/services/proxy.ycp Thu Feb 23 11:37:07 2012 @@ -336,6 +336,13 @@ return validate; } + +boolean UrlContainPassword( string url) +{ + map ret = URL::Parse( url); + + return size( ret[ "pass"]:"") > 0 ; +} /** * Proxy dialog * @param standalone true if not run from another ycp client @@ -481,8 +488,8 @@ UI::ChangeWidget(`id(`user), `ValidChars, ValidCharsUsername); UI::ChangeWidget(`id(`frame1), `Enabled, enabled); UI::ChangeWidget(`id(`frame2), `Enabled, enabled); - if ( !Mode::installation() ) - UI::ChangeWidget(`id("test_proxy"), `Enabled, enabled) ; + if ( !Mode::installation() ) + UI::ChangeWidget(`id("test_proxy"), `Enabled, enabled) ; InitSameProxy(); if(enabled == true) UI::SetFocus(`id(`http)); @@ -520,16 +527,30 @@ if(https == prefill) https = ""; if(ftp == prefill) ftp = ""; - if(enabled == false) - break; - else { - if((http == "") && (https == "") && (ftp == "") ){ - /* Popup error text - http, https and ftp proxy URLs are blank */ - if(!Popup::ContinueCancel(_("Proxy is enabled, but no proxy URL has been specified. + if(enabled == false) + break; + if((http == "") && (https == "") && (ftp == "") ){ + /* Popup error text - http, https and ftp proxy URLs are blank */ + if(!Popup::ContinueCancel(_("Proxy is enabled, but no proxy URL has been specified. +Really use these settings?"))) + continue; + } + // bnc#694582 - username and password in URL + else + { + boolean password_inside = UrlContainPassword( http) || + UrlContainPassword( https) || + UrlContainPassword( ftp); + + if( (password_inside) && ( ret != "test_proxy")) + { + if(!Popup::ContinueCancel(_("Security warning: +Username and password will be stored unencrypted +in a worldwide readable plaintext file. Really use these settings?"))) - continue; - } - } + continue; + } + } /* check_* */ if(user == "" && pass != "") { /* Popup::Error text */ Modified: trunk/network/testsuite/tests/runtime.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/testsuite/tests/runtime.y... ============================================================================== --- trunk/network/testsuite/tests/runtime.ycp (original) +++ trunk/network/testsuite/tests/runtime.ycp Thu Feb 23 11:37:07 2012 @@ -32,6 +32,7 @@ ], "target" : $[ "size" : 1, + "stat" : $[ "dummy": true ] ], ]; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
mfilka@svn2.opensuse.org