aboutsummaryrefslogtreecommitdiff
path: root/bbot/agent/agent.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bbot/agent/agent.cxx')
-rw-r--r--bbot/agent/agent.cxx19
1 files changed, 14 insertions, 5 deletions
diff --git a/bbot/agent/agent.cxx b/bbot/agent/agent.cxx
index 4760578..82a5f69 100644
--- a/bbot/agent/agent.cxx
+++ b/bbot/agent/agent.cxx
@@ -1044,7 +1044,7 @@ try
}
else
{
- for (const string& u: controllers)
+ for (string& u: controllers)
{
task_response_manifest r;
@@ -1101,14 +1101,23 @@ try
if (!r.session.empty ()) // Got a task.
{
- url = u;
-
const task_manifest& t (*r.task);
+
+ // For security reasons let's require the repository location to be
+ // remote.
+ //
+ if (t.repository.local ())
+ {
+ error << "local repository from " << u << ": " << t.repository;
+ continue;
+ }
+
l2 ([&]{trace << "task for " << t.name << '/' << t.version << " "
<< "on " << t.machine << " "
- << "from " << url;});
+ << "from " << u;});
- tr = move (r);
+ tr = move (r);
+ url = move (u);
break;
}
}