mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-10 18:23:28 +00:00
Fixed crash when no username and email are supplied in the login page
This commit is contained in:
parent
c3253d971f
commit
cc128417dc
@ -25772,7 +25772,7 @@ int get_user_line(LOGBOOK * lbs, char *user, char *password, char *full_name, ch
|
|||||||
sprintf(str, "/list/user[name=%s]", user);
|
sprintf(str, "/list/user[name=%s]", user);
|
||||||
if ((user_node = mxml_find_node(lbs->pwd_xml_tree, str)) == NULL)
|
if ((user_node = mxml_find_node(lbs->pwd_xml_tree, str)) == NULL)
|
||||||
return 2;
|
return 2;
|
||||||
} else if (email[0]) {
|
} else if (email && email[0]) {
|
||||||
sprintf(str, "/list/user[email=%s]", email);
|
sprintf(str, "/list/user[email=%s]", email);
|
||||||
if ((user_node = mxml_find_node(lbs->pwd_xml_tree, str)) == NULL)
|
if ((user_node = mxml_find_node(lbs->pwd_xml_tree, str)) == NULL)
|
||||||
return 2;
|
return 2;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user