[
https://issues.apache.org/jira/browse/AIRFLOW-3298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on AIRFLOW-3298 started by Brad Holmes.
--------------------------------------------
> Webserver with ldap is not robust to changes in underlying database
> -------------------------------------------------------------------
>
> Key: AIRFLOW-3298
> URL: https://issues.apache.org/jira/browse/AIRFLOW-3298
> Project: Apache Airflow
> Issue Type: Bug
> Components: authentication
> Affects Versions: 1.10.0
> Reporter: Brad Holmes
> Assignee: Brad Holmes
> Priority: Major
>
> When a user-id is stored in the web-browser, and the underlying database
> changes so that the user-id is invalid, the webserver gets stuck, and throws
> an exception as it tries to use {{None}} as an object, and find the
> {{username}}.
> The problem is in {{load_user}} or {{ldap_auth.py}}:
> {code}
> def load_user(userid, session=None):
> log.debug("Loading user %s", userid)
> if not userid or userid == 'None':
> return None
> user = session.query(models.User).filter(models.User.id ==
> int(userid)).first()
> return LdapUser(user)
> {code}
> {{LdapUser}} must not be constructed with {{user=None}}.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)