mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Avoid cleartext password on URL if wrong username was supplied
SVN revision: 418
This commit is contained in:
parent
12596149cf
commit
a3bb9a6682
34
src/elogd.c
34
src/elogd.c
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.31 2003/02/27 16:40:13 midas
|
||||||
|
Avoid cleartext password on URL if wrong username was supplied
|
||||||
|
|
||||||
Revision 1.30 2003/02/26 21:20:35 midas
|
Revision 1.30 2003/02/26 21:20:35 midas
|
||||||
Fixed bug that attributes in replies were not found in searches if display in threaded mode
|
Fixed bug that attributes in replies were not found in searches if display in threaded mode
|
||||||
|
|
||||||
@ -10126,6 +10129,18 @@ char status, str[256], upwd[256], full_name[256], email[256];
|
|||||||
if (isparam("wpwd"))
|
if (isparam("wpwd"))
|
||||||
rsprintf("<tr><td colspan=2 class=\"dlgerror\">%s!</td></tr>\n", loc("Wrong password"));
|
rsprintf("<tr><td colspan=2 class=\"dlgerror\">%s!</td></tr>\n", loc("Wrong password"));
|
||||||
|
|
||||||
|
if (isparam("wusr"))
|
||||||
|
{
|
||||||
|
sprintf(str, loc("Invalid user name <b>%s</b>"), getparam("wusr"));
|
||||||
|
rsprintf("<tr><td colspan=2 class=\"dlgerror\">%s!</td></tr>\n", str);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isparam("wfil"))
|
||||||
|
{
|
||||||
|
sprintf(str, loc("Cannot open file <b>%s</b>"), getparam("wfil"));
|
||||||
|
rsprintf("<tr><td colspan=2 class=\"dlgerror\">%s!</td></tr>\n", str);
|
||||||
|
}
|
||||||
|
|
||||||
rsprintf("<tr><td colspan=2 class=\"dlgtitle\">%s</td></tr>\n", loc("Please login"));
|
rsprintf("<tr><td colspan=2 class=\"dlgtitle\">%s</td></tr>\n", loc("Please login"));
|
||||||
|
|
||||||
rsprintf("<tr><td align=right class=\"dlgform\">%s:</td>\n", loc("Username"));
|
rsprintf("<tr><td align=right class=\"dlgform\">%s:</td>\n", loc("Username"));
|
||||||
@ -10157,13 +10172,16 @@ char status, str[256], upwd[256], full_name[256], email[256];
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (status == 2)
|
if (status == 2)
|
||||||
sprintf(full_name, loc("Invalid user name <b>%s</b>"), user);
|
{
|
||||||
|
sprintf(str, "?wusr=%s", user);
|
||||||
|
redirect(lbs, str);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
getcfg(lbs->name, "Password file", str);
|
getcfg(lbs->name, "Password file", full_name);
|
||||||
sprintf(full_name, loc("Cannot open file <b>%s</b>"), str);
|
sprintf(str, "?wfil=%s", full_name);
|
||||||
|
redirect(lbs, str);
|
||||||
}
|
}
|
||||||
show_error(full_name);
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -11331,8 +11349,8 @@ struct timeval timeout;
|
|||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
perror("server_loop");
|
perror("server_loop");
|
||||||
printf("Error created pid file \"PIDPATH\".\n");
|
printf("Error creating pid file \"%s\".\n", PIDPATH);
|
||||||
exit(1);
|
// exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(buf, 0, sizeof(buf));
|
memset(buf, 0, sizeof(buf));
|
||||||
@ -11340,8 +11358,8 @@ struct timeval timeout;
|
|||||||
if (write(fd, buf, strlen(buf)) == -1)
|
if (write(fd, buf, strlen(buf)) == -1)
|
||||||
{
|
{
|
||||||
perror("server_loop");
|
perror("server_loop");
|
||||||
printf("Error writing to pid file \"PIDPATH\".\n");
|
printf("Error writing to pid file \"%s\".\n", PIDPATH);
|
||||||
exit(1);
|
// exit(1);
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user