feluelle commented on a change in pull request #5530: [AIRFLOW-1740] Fix xcom 
creation and update via UI
URL: https://github.com/apache/airflow/pull/5530#discussion_r300277945
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -2685,6 +2685,9 @@ class XComView(wwwutils.SuperUserMixin, 
AirflowModelView):
     filter_converter = wwwutils.UtcFilterConverter()
     form_overrides = dict(execution_date=DateTimeField)
 
+    def on_model_change(self, form, model, is_created):
+        XCom.set(**form.data)
 
 Review comment:
   @ashb @XD-DENG I am wondering if passing `**form.data` is a security 
vulnerability or not.
   
   Would it then be possible to add a html field to the form called `session` 
to hijack a session? Should I rather set it directly 
`task_id=form.data['task_id']` etc. or even use model's values 
`task_id=model.task_id` etc. ? What is the difference? 
   
   It works but there are many points I am unsure about.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to