FORTH-ICS-INSPIRE / artemis-web

The web frontend of the ARTEMIS software project (https://github.com/FORTH-ICS-INSPIRE/artemis).
BSD 3-Clause "New" or "Revised" License
5 stars 8 forks source link

Cannot login via ldap - dn not escaped before insertion to filter #154

Closed tommywo closed 2 years ago

tommywo commented 2 years ago

Describe the bug We cannot login to artemis using LDAP - web ui shows 502 error from nginx, frontend service throws error

Affected Component(s)

To Reproduce Steps to reproduce the behavior:

  1. Configure LDAP
  2. Try to login with user that has ( or ) in DN

Expected behavior User is logged in

Screenshots image System (please complete the following information):

Additional context Similar issue https://github.com/ldapjs/node-ldapjs/issues/621

vkotronis commented 2 years ago

@tommywo this seems like an LDAP-specific issue. We can check if we can escape it in the nextjs package we are using, but typically these types of problems are on-premise and hard to replicate. We will check if we should upgrade or downgrade the ldap filter version we are using, but that might affect other users too so needs some checking. @CuriouzK0d3r could you comment here with the current package versions we employ in artemis-web?

@tommywo a temp fix is to use a DN with legal characters, not sure what is allowed according to the standard.

CuriouzK0d3r commented 2 years ago

Hello! We are using passport-ldapauth: ^3.0.1 alongside with passport: ^0.5.0 :)