You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/01/12 18:55:19 UTC

[GitHub] kaxil commented on a change in pull request #4463: [AIRFLOW-3655] Escape links generated in model views

kaxil commented on a change in pull request #4463: [AIRFLOW-3655] Escape links generated in model views
URL: https://github.com/apache/airflow/pull/4463#discussion_r247322273
 
 

 ##########
 File path: airflow/www_rbac/views.py
 ##########
 @@ -2003,6 +2003,7 @@ def pool_link(attr):
         pool_id = attr.get('pool')
         if pool_id is not None:
             url = '/taskinstance/list/?_flt_3_pool=' + str(pool_id)
+            pool_id = escape(pool_id)
 
 Review comment:
   @ashb I think this needs to be the following. The `url` would still have non-escaped characters otherwise or am I missing something?
   
   ```
   if pool_id is not None:
               pool_id = escape(pool_id)
               url = '/taskinstance/list/?_flt_3_pool=' + str(pool_id)
               return Markup("<a href='{url}'>{pool_id}</a>".format(**locals()))
   
   ```

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


With regards,
Apache Git Services