UtrechtUniversity / yoda

A system for reliable, long-term storing and archiving large amounts of research data during all stages of a study.
https://utrechtuniversity.github.io/yoda/
GNU General Public License v3.0
46 stars 27 forks source link

[BUG] When oidc_enable: false in ansible full.yml, web portal throws Internal Server Error on login #226

Closed fj-morales closed 1 year ago

fj-morales commented 1 year ago

Is there an existing issue for this?

Current Behavior

When installing YODA via ansible and the oidc_active variable is set to false, the flask.cfg lacks any OIDC configuration, provoking that the file /var/www/yoda/user/user.py fails when trying to access the oidc_domains, which is None; therefore, producing an Internal Server Error

File "/var/www/yoda/user/user.py", line 433, in get_login_placeholder
    if len(oidc_domains) == 0 or oidc_domains[0] == "":
        TypeError: object of type 'NoneType' has no len()

image

Expected Behavior

When the oidc_active variable is set to false, the YODA login page should show the login prompt to enter the username

Steps To Reproduce

Install YODA via ansible with: oidc_active: false

Environment

- Yoda: v1.8.6
- Ansible: 2.13.7
- Operating System: Centos 7
- Browser: Chrome

Anything else?

No response

stsnel commented 1 year ago

Thanks for the bug report, we're tracking this issue as YDA-5151 in our internal bug database.

stsnel commented 1 year ago

Fixed for 1.9.0 with https://github.com/UtrechtUniversity/yoda-portal/pull/188 ; also to be cherry-picked to 1.8.7