{"action":"created","issue":{"url":"https://api.github.com/repos/dreamfactorysoftware/dsp-core/issues/76","labels_url":"https://api.github.com/repos/dreamfactorysoftware/dsp-core/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/dreamfactorysoftware/dsp-core/issues/76/comments","events_url":"https://api.github.com/repos/dreamfactorysoftware/dsp-core/issues/76/events","html_url":"https://github.com/dreamfactorysoftware/dsp-core/issues/76","id":69243220,"number":76,"title":"POST vars missing in Event Script event object","user":{"login":"ibnIrshad","id":235903,"avatar_url":"https://avatars.githubusercontent.com/u/235903?v=3","gravatar_id":"","url":"https://api.github.com/users/ibnIrshad","html_url":"https://github.com/ibnIrshad","followers_url":"https://api.github.com/users/ibnIrshad/followers","following_url":"https://api.github.com/users/ibnIrshad/following{/other_user}","gists_url":"https://api.github.com/users/ibnIrshad/gists{/gist_id}","starred_url":"https://api.github.com/users/ibnIrshad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibnIrshad/subscriptions","organizations_url":"https://api.github.com/users/ibnIrshad/orgs","repos_url":"https://api.github.com/users/ibnIrshad/repos","events_url":"https://api.github.com/users/ibnIrshad/events{/privacy}","received_events_url":"https://api.github.com/users/ibnIrshad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-18T00:01:08Z","updated_at":"2015-04-18T00:04:23Z","closed_at":null,"body":"I created a custom event script for the `/user/register` API endpoint (called `user.register.post.pre_process`), in order to do recaptcha validation. However the POST vars which were being sent from client's end were not exposed in the server's `event` object provided for my script, not even the required \"email\" var. I tried dumping the `event` object, but I found `event.request.body` to be an empty array.\r\n\r\nQuery parameters were however recorded in `event.request.query`. So I used a workaround by sending everything in the query params instead of POST vars."},"comment":{"url":"https://api.github.com/repos/dreamfactorysoftware/dsp-core/issues/comments/94103212","html_url":"https://github.com/dreamfactorysoftware/dsp-core/issues/76#issuecomment-94103212","issue_url":"https://api.github.com/repos/dreamfactorysoftware/dsp-core/issues/76","id":94103212,"user":{"login":"ibnIrshad","id":235903,"avatar_url":"https://avatars.githubusercontent.com/u/235903?v=3","gravatar_id":"","url":"https://api.github.com/users/ibnIrshad","html_url":"https://github.com/ibnIrshad","followers_url":"https://api.github.com/users/ibnIrshad/followers","following_url":"https://api.github.com/users/ibnIrshad/following{/other_user}","gists_url":"https://api.github.com/users/ibnIrshad/gists{/gist_id}","starred_url":"https://api.github.com/users/ibnIrshad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibnIrshad/subscriptions","organizations_url":"https://api.github.com/users/ibnIrshad/orgs","repos_url":"https://api.github.com/users/ibnIrshad/repos","events_url":"https://api.github.com/users/ibnIrshad/events{/privacy}","received_events_url":"https://api.github.com/users/ibnIrshad/received_events","type":"User","site_admin":false},"created_at":"2015-04-18T00:04:23Z","updated_at":"2015-04-18T00:04:23Z","body":"The exposed `event` JS object (dumped in Python):\r\n\r\n```python \r\n{u'__tag__': u'exposed_event',\r\n u'dispatcher_id': u'000000000dc1050a00007f5fbb18586d',\r\n u'dispatcher_type': u'dream_factory.platform.events.event_dispatcher',\r\n u'extra': [],\r\n u'id': u'REDACTED',\r\n u'name': u'user.register.post.pre_process',\r\n u'platform': {u'config': {u'allow_admin_remote_logins': False,\r\n                           u'allow_guest_user': True,\r\n                           u'allow_open_registration': True,\r\n                           u'allow_remote_logins': False,\r\n                           u'allowed_hosts': [{u'host': u'*',\r\n                                               u'is_enabled': True,\r\n                                               u'verbs': [u'GET',\r\n                                                          u'POST',\r\n                                                          u'PUT',\r\n                                                          u'PATCH',\r\n                                                          u'MERGE',\r\n                                                          u'DELETE']}],\r\n                           u'created_by_id': None,\r\n                           u'created_date': u'2015-02-22 00:16:51',\r\n                           u'custom_settings': [],\r\n                           u'db': {u'date_format': None,\r\n                                   u'datetime_format': None,\r\n                                   u'max_records_returned': 1000,\r\n                                   u'time_format': None,\r\n                                   u'timestamp_format': None},\r\n                           u'db_version': u'1.9.0',\r\n                           u'dsp_version': u'1.9.1',\r\n                           u'editable_profile_fields': u'email,display_name,first_name,last_name,phone,default_app_id,security_question,security_answer',\r\n                           u'guest_role_id': 1,\r\n                           u'id': 1,\r\n                           u'install_name': u'Standalone Package',\r\n                           u'install_type': 1,\r\n                           u'invite_email_service_id': 3,\r\n                           u'invite_email_template_id': 1,\r\n                           u'is_guest': False,\r\n                           u'is_hosted': False,\r\n                           u'is_private': False,\r\n                           u'last_modified_by_id': 1,\r\n                           u'last_modified_date': u'2015-04-17 03:51:47',\r\n                           u'latest_version': u'1.9.1',\r\n                           u'lookup_keys': [],\r\n                           u'open_reg_email_service_id': 3,\r\n                           u'open_reg_email_template_id': 2,\r\n                           u'open_reg_role_id': 2,\r\n                           u'password_email_service_id': 3,\r\n                           u'password_email_template_id': 3,\r\n                           u'paths': {u'applications': u'/opt/dreamfactory/platform/storage/applications',\r\n                                      u'base': u'/opt/dreamfactory/platform',\r\n                                      u'plugins': u'/opt/dreamfactory/platform/opt/dreamfactory/platform/storage/plugins',\r\n                                      u'private': u'/opt/dreamfactory/platform/opt/dreamfactory/platform/storage/.private',\r\n                                      u'storage': u'/opt/dreamfactory/platform/storage',\r\n                                      u'swagger': u'/opt/dreamfactory/platform/storage/swagger'},\r\n                           u'remote_login_providers': [],\r\n                           u'restricted_verbs': [],\r\n                           u'server_os': u'linux',\r\n                           u'states': {u'operation_state': -1,\r\n                                       u'provision_state': 0,\r\n                                       u'ready_state': 0},\r\n                           u'timestamp_format': u'Y-m-d H:i:s',\r\n                           u'upgrade_available': False},\r\n               u'session': False},\r\n u'request': {u'body': [],\r\n              u'cookies': [],\r\n              u'files': False,\r\n              u'headers': {u'accept': [u'*/*'],\r\n                           u'accept-encoding': [u'gzip, deflate'],\r\n                           u'connection': [u'keep-alive'],\r\n                           u'content-length': [u'39'],\r\n                           u'content-type': [u'application/x-www-form-urlencoded'],\r\n                           u'host': [u'qute.qasid.com:8000'],\r\n                           u'user-agent': [u'python-requests/2.5.3 CPython/2.7.8 Darwin/14.3.0']},\r\n              u'method': u'POST',\r\n              u'query': {u'app_name': u'qasidata', u'capresponse': u'sdf'}},\r\n u'request_path': u'rest/user/register',\r\n u'response': None,\r\n u'stop_propagation': False,\r\n u'timestamp': u'2015-04-18T03:02:26+03:00',\r\n u'trigger': u'/user/register'}```"}}