mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 23:13:00 +00:00

self.authenticate can return None, in which case you can't subscript. So move extracting data into the branch checking whether authenticate is not `None`. Now that extracting the username is inside the if branch, it can't be used in the else one, so extract username from the request itself. This can be easily reproduce with the default PAM login with a wrong non existing/ wrong username.