Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon3.gif   logout to external page, posted by Christof Hanke on Wed May 6 11:00:14 2015 logout_to_page.patch
    icon2.gif   Re: logout to external page, posted by Stefan Ritt on Tue Jun 9 16:09:39 2015 
       icon2.gif   Re: logout to external page, posted by Christof Hanke on Tue Jun 9 16:58:28 2015 
Message ID: 67882     Entry time: Wed May 6 11:00:14 2015     Reply to this: 67977
Icon: Idea  Author: Christof Hanke  Author Email: hanke@rzg.mpg.de 
Category: Request  OS: All  ELOG Version: 3.1.0 
Subject: logout to external page 

Hi Stefan,

I am happy to see that you include the webserver authentication.
So I can now login at some other page and then access elog.
However, I would also need some means of logging out some where else.

For this I propose a new Configuration option "Logout to page" which redirects to another page if set and "Logout to main" is 0.

See the attached patch (against git HEAD)

 

Does this make sense to you ?

 

Christof

PS: Many thanks for the autosave mode,  I already used it ;-)
 

Attachment 1: logout_to_page.patch  558 Bytes  | Hide | Hide all
diff --git a/src/elogd.c b/src/elogd.c
index 601639c..0f976be 100755
--- a/src/elogd.c
+++ b/src/elogd.c
@@ -27975,6 +27975,11 @@ void interprete(char *lbook, char *path)
       if (getcfg(lbs->name, "Logout to main", str, sizeof(str)) && atoi(str) == 1) {
          sprintf(str, "../");
          setparam("redir", str);
+      } else {
+         getcfg(lbs->name, "Logout to page", str, sizeof(str));
+         if (str[0]) {
+             setparam("redir", str);
+         }
       }
       set_sid_cookie(lbs, "", "");
       sid_remove(getparam("sid"));
ELOG V3.1.5-3fb85fa6