mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-14 20:33:48 +00:00
Fixed probelem with redirection
SVN revision: 666
This commit is contained in:
parent
78cbcc39fc
commit
dc606e88d6
19
src/elogd.c
19
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.184 2004/01/13 11:40:40 midas
|
||||||
|
Fixed probelem with redirection
|
||||||
|
|
||||||
Revision 1.183 2004/01/13 10:09:05 midas
|
Revision 1.183 2004/01/13 10:09:05 midas
|
||||||
Fixed bug in get_logbook_hierarchy()
|
Fixed bug in get_logbook_hierarchy()
|
||||||
|
|
||||||
@ -4085,6 +4088,12 @@ void set_location(LOGBOOK * lbs, char *rel_path)
|
|||||||
rsputs("Location: ");
|
rsputs("Location: ");
|
||||||
rsputs(str);
|
rsputs(str);
|
||||||
|
|
||||||
|
/* add top group if existing and not logbook */
|
||||||
|
if (!lbs && getcfg_topgroup()) {
|
||||||
|
rsputs(getcfg_topgroup());
|
||||||
|
rsputs("/");
|
||||||
|
}
|
||||||
|
|
||||||
if (strncmp(rel_path, "../", 3) == 0)
|
if (strncmp(rel_path, "../", 3) == 0)
|
||||||
rsputs(rel_path + 3);
|
rsputs(rel_path + 3);
|
||||||
else if (strcmp(rel_path, ".") == 0) {
|
else if (strcmp(rel_path, ".") == 0) {
|
||||||
@ -4126,7 +4135,7 @@ void set_redir(LOGBOOK * lbs, char *redir)
|
|||||||
else {
|
else {
|
||||||
if (lbs)
|
if (lbs)
|
||||||
sprintf(str, "../%s/", lbs->name_enc);
|
sprintf(str, "../%s/", lbs->name_enc);
|
||||||
else
|
else if (getcfg_topgroup())
|
||||||
sprintf(str, ".");
|
sprintf(str, ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12000,8 +12009,8 @@ BOOL check_user_password(LOGBOOK * lbs, char *user, char *password, char *redir)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
if (status == 2) {
|
if (status == 2) {
|
||||||
sprintf(str, "?wusr=%s", user);
|
|
||||||
|
|
||||||
|
sprintf(str, "?wusr=%s", user);
|
||||||
setparam("redir", str);
|
setparam("redir", str);
|
||||||
|
|
||||||
/* remove remaining cookies */
|
/* remove remaining cookies */
|
||||||
@ -13011,8 +13020,10 @@ void interprete(char *lbook, char *path)
|
|||||||
if (equal_ustring(command, loc("Logout"))) {
|
if (equal_ustring(command, loc("Logout"))) {
|
||||||
/* log activity */
|
/* log activity */
|
||||||
logf(lbs, "LOGOUT");
|
logf(lbs, "LOGOUT");
|
||||||
if (getcfg(lbs->name, "Logout to main", str) && atoi(str) == 1)
|
if (getcfg(lbs->name, "Logout to main", str) && atoi(str) == 1) {
|
||||||
setparam("redir", "../");
|
sprintf(str, "../");
|
||||||
|
setparam("redir", str);
|
||||||
|
}
|
||||||
set_login_cookies(lbs, "", "");
|
set_login_cookies(lbs, "", "");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user