From a6516798c0398f14a8d851d93d3ce0786f6263f1 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sun, 16 Jan 2011 19:25:10 +0000 Subject: [PATCH] proper fix for that previous "stacked" fix (that one screwed other injection types) --- lib/core/agent.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/core/agent.py b/lib/core/agent.py index b83fb2ce2..7c870cbf9 100644 --- a/lib/core/agent.py +++ b/lib/core/agent.py @@ -150,12 +150,10 @@ class Agent: query = kb.injection.prefix if query is None: - if not kb.injection.prefix and not prefix: - query = "" - elif kb.injection.prefix is None and prefix: - query = "%s " % prefix - else: - query = "%s " % kb.injection.prefix + query = kb.injection.prefix or prefix or '' + + if not (string and string[0] == ';'): + query += " " query = "%s%s" % (query, string) query = self.cleanupPayload(query)