Latest fields incorrent validation prevent successful submissions.
Way to reproduce:
- Create a default context
- Create a default receiver and associate it to the context
- Make a simple submission without completing any field.
@vecna can you please take care of debugging this?
The following is the related stack trace:
2013-08-25 12:44:57+0200 HTTPRequest(protocol='http', host='127.0.0.1:8082', method='PUT', uri='/submission/b5fbe155-d288-4eca-8590-505a41671a3c', version='HTTP/1.1', remote_ip='127.0.0.1', body='{"wb_fields":{"Short title":"","Full description":"","Files description":""},"pertinence":"0","receivers":["ed33294d-b0ae-40e6-afd1-5b75cc718459"],"expiration_date":"2013-09-09T10:44:47.447275","access_limit":50,"receipt":"","context_gus":"6cf25587-7ded-474c-a65a-744587c90d88","creation_date":"2013-08-25T11:44:47.447308","escalation_threshold":"0","download_limit":3,"submission_gus":"b5fbe155-d288-4eca-8590-505a41671a3c","mark":"submission","id":"b5fbe155-d288-4eca-8590-505a41671a3c","files":[],"finalize":true}', headers={'Origin': 'http://127.0.0.1:8082', 'Content-Length': '516', 'Accept-Language': 'en-US,en;q=0.8', 'Accept-Encoding': 'gzip,deflate,sdch', 'Gl-Language': 'en', 'Host': '127.0.0.1:8082', 'Accept': 'application/json, text/plain, /', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/28.0.1500.71 Chrome/28.0.1500.71 Safari/537.36', 'Connection': 'keep-alive', 'X-Requested-With': 'XMLHttpRequest', 'Referer': 'http://127.0.0.1:8082/', 'X-Xsrf-Token': '3c58fced173e4308af25d163d74139dd', 'Cookie': 'XSRF-TOKEN=3c58fced173e4308af25d163d74139dd; language=en', 'Content-Type': 'application/json;charset=UTF-8'})
2013-08-25 12:44:57+0200 {'Origin': 'http://127.0.0.1:8082', 'Content-Length': '516', 'Accept-Language': 'en-US,en;q=0.8', 'Accept-Encoding': 'gzip,deflate,sdch', 'Gl-Language': 'en', 'Connection': 'keep-alive', 'Accept': 'application/json, text/plain, /', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/28.0.1500.71 Chrome/28.0.1500.71 Safari/537.36', 'Host': '127.0.0.1:8082', 'X-Requested-With': 'XMLHttpRequest', 'Cookie': 'XSRF-TOKEN=3c58fced173e4308af25d163d74139dd; language=en', 'X-Xsrf-Token': '3c58fced173e4308af25d163d74139dd', 'Referer': 'http://127.0.0.1:8082/', 'Content-Type': 'application/json;charset=UTF-8'}
2013-08-25 12:44:58+0200 '[!] Submission has a required field (Short title) missing'
2013-08-25 12:44:58+0200 [ ] 412 PUT /submission/b5fbe155-d288-4eca-8590-505a41671a3c (127.0.0.1): GLException
2013-08-25 12:44:58+0200 [http] 412 PUT /submission/b5fbe155-d288-4eca-8590-505a41671a3c (127.0.0.1) 164.42ms
2013-08-25 12:45:00+0200 HTTPRequest(protocol='http', host='127.0.0.1:8082', method='PUT', uri='/submission/b5fbe155-d288-4eca-8590-505a41671a3c', version='HTTP/1.1', remote_ip='127.0.0.1', body='{"wb_fields":{"Short title":"","Full description":"","Files description":""},"pertinence":"0","receivers":["ed33294d-b0ae-40e6-afd1-5b75cc718459","ed33294d-b0ae-40e6-afd1-5b75cc718459"],"expiration_date":"2013-09-09T10:44:47.447275","access_limit":50,"receipt":"","context_gus":"6cf25587-7ded-474c-a65a-744587c90d88","creation_date":"2013-08-25T11:44:47.447308","escalation_threshold":"0","download_limit":3,"submission_gus":"b5fbe155-d288-4eca-8590-505a41671a3c","mark":"submission","id":"b5fbe155-d288-4eca-8590-505a41671a3c","files":[],"finalize":true}', headers={'Origin': 'http://127.0.0.1:8082', 'Content-Length': '555', 'Accept-Language': 'en-US,en;q=0.8', 'Accept-Encoding': 'gzip,deflate,sdch', 'Gl-Language': 'en', 'Host': '127.0.0.1:8082', 'Accept': 'application/json, text/plain, /', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/28.0.1500.71 Chrome/28.0.1500.71 Safari/537.36', 'Connection': 'keep-alive', 'X-Requested-With': 'XMLHttpRequest', 'Referer': 'http://127.0.0.1:8082/', 'X-Xsrf-Token': '3c58fced173e4308af25d163d74139dd', 'Cookie': 'XSRF-TOKEN=3c58fced173e4308af25d163d74139dd; language=en', 'Content-Type': 'application/json;charset=UTF-8'})
2013-08-25 12:45:00+0200 {'Origin': 'http://127.0.0.1:8082', 'Content-Length': '555', 'Accept-Language': 'en-US,en;q=0.8', 'Accept-Encoding': 'gzip,deflate,sdch', 'Gl-Language': 'en', 'Connection': 'keep-alive', 'Accept': 'application/json, text/plain, /', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/28.0.1500.71 Chrome/28.0.1500.71 Safari/537.36', 'Host': '127.0.0.1:8082', 'X-Requested-With': 'XMLHttpRequest', 'Cookie': 'XSRF-TOKEN=3c58fced173e4308af25d163d74139dd; language=en', 'X-Xsrf-Token': '3c58fced173e4308af25d163d74139dd', 'Referer': 'http://127.0.0.1:8082/', 'Content-Type': 'application/json;charset=UTF-8'}
2013-08-25 12:45:00+0200 File "/data/devel/GLBackend/globaleaks/settings.py", line 562, in _wrap
2013-08-25 12:45:00+0200 result = function(self.store, _args, *_kwargs)
2013-08-25 12:45:00+0200 File "/data/devel/GLBackend/globaleaks/handlers/submission.py", line 58, in create_whistleblower_tip
2013-08-25 12:45:00+0200 assert submission is not None and submission.has_key('id')
2013-08-25 12:45:00+0200 "[!] Uncaught exception <type 'exceptions.AssertionError'> <traceback object at 0x7f2170067050>"
2013-08-25 12:45:00+0200 [ ]
2013-08-25 12:45:00+0200 '[!] AssertionError Assertion failed.'
2013-08-25 12:45:00+0200 '[!] Traceback (most recent call last):\n\n File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1068, in _inlineCallbacks\n result = result.throwExceptionIntoGenerator(g)\n\n File "/usr/local/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator\n return g.throw(self.type, self.value, self.tb)\n\n File "/data/devel/GLBackend/globaleaks/handlers/submission.py", line 410, in put\n receipt = yield create_whistleblower_tip(status)\n\n File "/usr/local/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 191, in _worker\n result = context.call(ctx, function, _args, *_kwargs)\n\n File "/usr/local/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext\n return self.currentContext().callWithContext(ctx, func, _args, *_kw)\n\n File "/usr/local/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext\n return func(args,*kw)\n\n File "/data/devel/GLBackend/globaleaks/settings.py", line 575, in _wrap\n raise excep\n\nAssertionError\n'
T: Bug C: Backend