ALIADA / aliada-tool

Aliada tool implementation
GNU General Public License v3.0
35 stars 14 forks source link

Login fails if browser language is not one of the supported languages #173

Open osma opened 8 years ago

osma commented 8 years ago

I've installed Aliada and trying to log in the user interface from my browser (Firefox) using the default credentials admin/admin.

The login fails with the message "The logon is invalid".

I traced the MySQL query that is used for verifying the credentials. It looks like this: 160913 10:12:36 37 Query select user_name,user_password,org_name, u.user_type_code from aliada.user u INNER JOIN aliada.organisation o ON u.organisationId = o.organisationId INNER JOIN aliada.t_user_type t ON t.user_type_code = u.user_type_code where user_name = 'admin' AND language = 'fin'

Note the last part language = 'fin'. This appears to come from the preferred languages setting in my browser. If I set the preferred language to Swedish in my browser settings, then this changes to swe and the login still fails. But if I change the preferred language to English, then the language condition becomes eng and login is successful.

A workaround is to first click on the "English" language link at the bottom of the login form, after that I can log in regardless of the language setting in my browser.

Looking at the data in the t_user_type table, I see entries for the languages eng, hun, ita and spa. So it appears that if the browser is using a language other than these, login will not work unless the user clicks on one of the language links first.

eturienzo commented 8 years ago

Hi Osma,

That's correct, The application was designed to work with the four languages of the project. We forgot check one of them by default. Sorry.

Regards,

Elena