diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/toaster/toastergui/tests.py | 2 | ||||
-rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastergui/tests.py b/bitbake/lib/toaster/toastergui/tests.py index 1b6e78d517..4e420ea269 100644 --- a/bitbake/lib/toaster/toastergui/tests.py +++ b/bitbake/lib/toaster/toastergui/tests.py | |||
@@ -155,7 +155,7 @@ class ViewTests(TestCase): | |||
155 | response = self.client.post(reverse('xhr_importlayer'), args) | 155 | response = self.client.post(reverse('xhr_importlayer'), args) |
156 | data = json.loads(response.content) | 156 | data = json.loads(response.content) |
157 | self.assertEqual(response.status_code, 200) | 157 | self.assertEqual(response.status_code, 200) |
158 | self.assertNotEqual(data["error"], "ok") | 158 | self.assertEqual(data["error"], "ok") |
159 | 159 | ||
160 | #Test to verify import of a layer successful | 160 | #Test to verify import of a layer successful |
161 | args['name'] = "meta-oe" | 161 | args['name'] = "meta-oe" |
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index dfa256e8ea..13489af6fd 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -2185,8 +2185,11 @@ if True: | |||
2185 | layers_added = []; | 2185 | layers_added = []; |
2186 | 2186 | ||
2187 | # Rudimentary check for any possible html tags | 2187 | # Rudimentary check for any possible html tags |
2188 | if "<" in request.POST: | 2188 | for val in request.POST.values(): |
2189 | return HttpResponse(jsonfilter({"error": "Invalid character <"}), content_type = "application/json") | 2189 | if "<" in val: |
2190 | return HttpResponse(jsonfilter( | ||
2191 | {"error": "Invalid character <"}), | ||
2192 | content_type="application/json") | ||
2190 | 2193 | ||
2191 | prj = Project.objects.get(pk=request.POST['project_id']) | 2194 | prj = Project.objects.get(pk=request.POST['project_id']) |
2192 | 2195 | ||