Blob Blame History Raw
This disables actions -- they're mostly useless anyways, and possess a security
hazard (in past, configuation file with broken escaping was created, and we
have to ignore it).

Lubomir Kundrak <lkundrak@redhat.com>

diff -urp centerim-4.22.3.orig/src/centerim.cc centerim-4.22.3/src/centerim.cc
--- centerim-4.22.3.orig/src/centerim.cc	2008-03-11 21:40:28.000000000 +0100
+++ centerim-4.22.3/src/centerim.cc	2008-03-25 22:23:35.000000000 +0100
@@ -755,7 +755,7 @@ void centerim::checkmail() {
 
 void centerim::checkconfigs() {
     static const char *configs[] = {
-	"sounds", "colorscheme", "actions", "external", "keybindings", 0
+	"sounds", "colorscheme", "external", "keybindings", 0
     };
 
     struct stat st;
@@ -778,12 +778,9 @@ void centerim::checkconfigs() {
 			face.redraw();
 			break;
 		    case 2:
-			conf.loadactions();
-			break;
-		    case 3:
 			external.load();
 			break;
-		    case 4:
+		    case 3:
 			conf.loadkeys();
 			break;
 		}
@@ -1147,8 +1144,13 @@ icqface::eventviewresult centerim::reade
 	    break;
 
 	case icqface::open:
-	    if(const imurl *m = static_cast<const imurl *>(&ev))
-		conf.execaction("openurl", m->geturl());
+	    if(const imurl *m = static_cast<const imurl *>(&ev)) {
+	        if (fork () == 0) {
+	            face.log (m->geturl());
+	            execlp("xdg-open", "xdg-open", m->geturl().c_str(), NULL);
+	            exit (-1);
+	        }
+	    }
 	    break;
 
 	case icqface::accept:
diff -urp centerim-4.22.3.orig/src/icqconf.cc centerim-4.22.3/src/icqconf.cc
--- centerim-4.22.3.orig/src/icqconf.cc	2008-03-11 21:40:28.000000000 +0100
+++ centerim-4.22.3/src/icqconf.cc	2008-03-25 22:21:50.000000000 +0100
@@ -212,7 +212,6 @@ void icqconf::load() {
     loadmainconfig();
     loadkeys();
     loadcolors();
-    loadactions();
     loadcaptcha();
     external.load();
 }
diff -urp centerim-4.22.3.orig/src/icqdialogs.cc centerim-4.22.3/src/icqdialogs.cc
--- centerim-4.22.3.orig/src/icqdialogs.cc	2008-03-11 21:40:28.000000000 +0100
+++ centerim-4.22.3/src/icqdialogs.cc	2008-03-25 22:21:50.000000000 +0100
@@ -1270,7 +1270,6 @@ bool icqface::updateconf(icqconf::regsou
 
 	i = t.addnode(_(" Communications "));
 	t.addleaff(i, 0, 19, _(" SMTP server : %s "), smtp.c_str());
-	t.addleaff(i, 0, 31, _(" HTTP browser : %s "), browser.c_str());
 	t.addleaff(i, 0, 24, _(" HTTP proxy server : %s "), httpproxy.c_str());
 
 	if(!httpproxy.empty())
@@ -1424,10 +1423,6 @@ bool icqface::updateconf(icqconf::regsou
 		    case 30:
 			cm = (cm == icqconf::cmproto ? icqconf::cmstatus : icqconf::cmproto );
 			break;
-		    case 31:
-		        tmp = inputstr(_("HTTP browser to use: "), browser);
-			if(!tmp.empty()) browser = tmp;
-		        break;
 		    case 32:    
 		        conf.setleftpanelwidth(atol(inputstr(_("Left panel width: "), 
 		            strint(conf.getleftpanelwidth())).c_str()));
@@ -2060,7 +2055,6 @@ bool icqface::setljparams(imxmlevent *ev
 			break;
 
 		    case 20: LJP_LIST("mood", moods, _("(none/custom)")); break;
-		    case 21: LJP_STR("music", _("Currently playing: ")); break;
 		    case 22: LJP_LIST("picture", pictures, _("(default)")); break;
 		    case 23: LJP_STR("mood", _("Current mood: ")); break;
 		    case 25: LJP_STR("taglist", _("Tags for the entry: ")); break;
@@ -2070,9 +2064,6 @@ bool icqface::setljparams(imxmlevent *ev
 		    case 33: LJP_BOOL("backdated"); break;
 		}
 
-	    } else if(b == 1) {
-		ev->setfield("music", conf.execaction("detectmusic"));
-
 	    } else if(b == 2) {
 		r = true;
 
diff -urp centerim-4.22.3.orig/src/icqface.cc centerim-4.22.3/src/icqface.cc
--- centerim-4.22.3.orig/src/icqface.cc	2008-03-11 21:40:28.000000000 +0100
+++ centerim-4.22.3/src/icqface.cc	2008-03-25 22:21:50.000000000 +0100
@@ -2246,7 +2246,11 @@ void icqface::showextractedurls() {
 	    m.additem(" " + *i);
 
 	if(n = m.open())
-	    conf.execaction("openurl", extractedurls[n-1]);
+	    if (fork () == 0) {
+	        log (extractedurls[n-1]);
+	        execlp("xdg-open", "xdg-open", extractedurls[n-1].c_str(), NULL);
+		exit (-1);
+	    }
 
 	restoreworkarea();
     }