Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 558 of 808  Not logged in ELOG logo
ID Date Icon Author Author Email Category OSdown ELOG Version Subject
  68335   Tue Jun 14 16:50:41 2016 Question Greg Christiangchristian@tamu.eduQuestionLinux3.1.1Guest menu commands not working as advertisted

Hello,

I am trying to set up my elog to have read-only guest access and require registration/password for users to be able to post to the elog. I've tried following the instructions here: https://midas.psi.ch/elog/faq.html#6, i.e. putting the following lines under the [global] section of my elogd.cfg file:

Menu commands = List, New, Edit, Reply, Duplicate, Find, Config, Logout, Help
Guest menu commands = List, Find, Login, Help

 

When I do this, I do get guest acccess, however the menu items are

New |  Find |  Select |  Import |  Config |  Logout |  Last day |  Help 

rather than the List, Find, Login, Help I would expect. Also, if I click on Logout, it simply does nothing, which means there's now no way to log in as a registered user.

Any thoughts on what might be wrong?

 

Thanks,

Greg

  68336   Tue Jun 14 17:01:04 2016 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux3.1.1Re: Guest menu commands not working as advertisted

There are two menus, one for the list display, and one for the individual entry display. To change the first, you need

List menu commands = ...
Guest list menu commands = ...

Greg Christian wrote:

Hello,

I am trying to set up my elog to have read-only guest access and require registration/password for users to be able to post to the elog. I've tried following the instructions here: https://midas.psi.ch/elog/faq.html#6, i.e. putting the following lines under the [global] section of my elogd.cfg file:

Menu commands = List, New, Edit, Reply, Duplicate, Find, Config, Logout, Help
Guest menu commands = List, Find, Login, Help

 

When I do this, I do get guest acccess, however the menu items are

New |  Find |  Select |  Import |  Config |  Logout |  Last day |  Help 

rather than the List, Find, Login, Help I would expect. Also, if I click on Logout, it simply does nothing, which means there's now no way to log in as a registered user.

Any thoughts on what might be wrong?

 

Thanks,

Greg

 

  68337   Tue Jun 14 18:32:03 2016 Reply Greg Christiangchristian@tamu.eduQuestionLinux3.1.1Re: Guest menu commands not working as advertisted

Got it. Thanks!

Stefan Ritt wrote:

There are two menus, one for the list display, and one for the individual entry display. To change the first, you need

List menu commands = ...
Guest list menu commands = ...

Greg Christian wrote:

Hello,

I am trying to set up my elog to have read-only guest access and require registration/password for users to be able to post to the elog. I've tried following the instructions here: https://midas.psi.ch/elog/faq.html#6, i.e. putting the following lines under the [global] section of my elogd.cfg file:

Menu commands = List, New, Edit, Reply, Duplicate, Find, Config, Logout, Help
Guest menu commands = List, Find, Login, Help

 

When I do this, I do get guest acccess, however the menu items are

New |  Find |  Select |  Import |  Config |  Logout |  Last day |  Help 

rather than the List, Find, Login, Help I would expect. Also, if I click on Logout, it simply does nothing, which means there's now no way to log in as a registered user.

Any thoughts on what might be wrong?

 

Thanks,

Greg

 

 

  68342   Mon Jun 27 16:06:55 2016 Reply Stefan Rittstefan.ritt@psi.chBug reportLinux2.9.2Re: Unable to set a custom logbook dir on Debian 8 from the repository package

The debian version of elog is pretty old with quite a number of bugs fixed in meantime. Unfortunatlely the debig packase has not bee updated by the maintainers. So better download the current version from bitbucket and compile elogd yourself.

S. Caiazza wrote:

Dear all

I installed elog from the current stable repository on Debian 8 (jessie)

The installation went on smoothly, I modified the configuration files of the Apache server as described in the manual to use the elog in parallel with an existing webserver and then I tested. The demo logbook loads fine and I see that elog created a folder for the logbook in /var/lib/elog/logbooks, which is the directory specified by default in the /etc/init.d/elog file.

Then I modified the /etc/elog.conf file, added the following lines in the global section (custompath is a local path) 

Resource dir = /<custompath>/elog/res
Logbook dir = /<custompath>/elog/logbooks

And I created a new logbook.

After restarting the elog service the second database is correctly created but both of them are still stored in  /var/lib/elog/logbooks so it seems the global configurations in the config file are overwritten.

How can I specify the custom folder so that the new logbooks are written there?

 

  68362   Wed Jul 20 16:03:24 2016 Entry Donjang.dongwook@gmail.comInfoLinuxELOG V3.1.0-241string length limit in url tag

What is the string length limit in url tag and how to increase it?

For example,

[url=http://example.com?<text_string>]click here[/url]

When I provide very long <text_string>, it was truncated and showed partial link only.

  68363   Thu Jul 21 06:15:44 2016 Reply Andreas Luedekeandreas.luedeke@psi.chInfoLinuxELOG V3.1.0-241Re: string length limit in url tag
Several strings in ELOG are limited to 256 chars. It is likely the limit for URLs, too.
The magic number "256" appears 285 times in the elogd.c file.
It is probaly easier if you compress long URLs with goo.gl
Cheers, Andreas
Don wrote:

What is the string length limit in url tag and how to increase it?

For example,

[url=http://example.com?<text_string>]click here[/url]

When I provide very long <text_string>, it was truncated and showed partial link only.

 

  68408   Wed Aug 31 10:31:19 2016 Warning Andreas Luedekeandreas.luedeke@psi.chBug reportLinux3.1.1Wrong time in attachment "Uploaded ..." date
When an attachment is later added to an exisiting entry, we see that the string "Uploaded <date>" has the wrong
time: in our case it is one hour into the future.
I'm testing it now here in the forum.

I can reproduce it in this forum: the Uploaded time should have been 10:35, but it shows 11:35.

Cheers, Andreas
Attachment 1: gnome-fs-bookmark-missing.png
gnome-fs-bookmark-missing.png
  68419   Tue Sep 6 20:09:07 2016 Reply Mark Bergmanmark.bergman@uphs.upenn.eduQuestionLinux2.90Re: error message "Command Config is not allowed" after registering

 

Mark Bergman wrote:

After registering, elog displays a page with the message:

     Error: Command "Config" is not allowed for user ""

However, the registration is successful. This causes confusion, and results in users registering multiple times.

 

In the elogd.conf file, I have the directive:

     Allow Config = bergman

 

Any suggestions?

 

Well, 5 years after opening this issue, with no responses here, I finally got into the source code and fixed it.

The problem seems to be if eLog is configured to prohibit users (non-administrators) from the "Config" option...but on the initial self-registration, the code goes to the Config screen for the user anyway...resulting in the false error message.

So, I [badly] hacked eLog to fix that, add some debugging/log messages, and to correct a typo.

Attached is the patch against release 3.1.1-1. Try not to cringe too much at my code. :)

Attachment 1: elogd.c.patch
*** ./elogd.c	Tue Aug 23 21:27:39 2016
--- ../../elog-3.1.1.orig/src/elogd.c	Tue Aug  4 09:30:54 2015
***************
*** 80,84 ****
  int _verbose_level, _current_message_id;
  int _logging_level, _ssl_flag;
- BOOL just_registered = FALSE;	/* flag to supress erroneous error */
  
  LOGBOOK *lb_list = NULL;
--- 80,83 ----
***************
*** 13363,13369 ****
  
     if (new_user) {
-       write_logfile(lbs,"In save_user_config() with new_user==TRUE, setting just_registered=TRUE");
-       just_registered = TRUE;
- 
        node = mxml_find_node(lbs->pwd_xml_tree, "/list");
        if (!node) {
--- 13362,13365 ----
***************
*** 13432,13436 ****
        mxml_write_tree(file_name, lbs->pwd_xml_tree);
  
- 
     /* if requested, send notification email to user or admin user */
     if (new_user && !first_user && (self_register == 2 || self_register == 3 || self_register == 4)
--- 13428,13431 ----
***************
*** 13616,13619 ****
--- 13611,13615 ----
                    };
                 }
+ 
                 pl = strtok(NULL, " ,");
              }
***************
*** 26649,26666 ****
     /* save user info if "save" is pressed */
     if (strieq(command, loc("Save")) && isparam("new_user_name") && !isparam("config")) {
!       if (!save_user_config(lbs, getparam("new_user_name"), TRUE)) {
           return 0;
!       }
!       if ( just_registered ) {
!          write_logfile(lbs,"In do_self_register with just_registered==TRUE, resetting flag, calling show_login_page(NULL,\"\",0)");
!          just_registered = FALSE;
!          show_login_page(NULL, "", 0);
!       } else {
!          if (lbs)
!             sprintf(str, "../%s/", lbs->name_enc);
!          else
!             sprintf(str, ".");
!          redirect(lbs, str);
!       }
        return 0;
     }
--- 26645,26655 ----
     /* save user info if "save" is pressed */
     if (strieq(command, loc("Save")) && isparam("new_user_name") && !isparam("config")) {
!       if (!save_user_config(lbs, getparam("new_user_name"), TRUE))
           return 0;
!       if (lbs)
!          sprintf(str, "../%s/", lbs->name_enc);
!       else
!          sprintf(str, ".");
!       redirect(lbs, str);
        return 0;
     }
***************
*** 27355,27364 ****
        /* check if user has access to logbook */
        if (!check_login_user(lbs, getparam("uname"))) {
!       	sprintf(str, "check_login_user access failure: user \"%s\", logbook \"%s\"", uname, lbs->name);
!       	write_logfile(lbs, str);
!          show_error("User has no access to this logbook.");
!          strlcpy(str, loc("New user"), sizeof(str));
!          url_encode(str, sizeof(str));
!          rsprintf("


<b><center><a href=\"?cmd=%s\">%s</a></center></b></td></tr>", str, loc("Register as new user")); return; } --- 27344,27348 ---- /* check if user has access to logbook */ if (!check_login_user(lbs, getparam("uname"))) { ! show_error("Use has no access to this logbook"); return; } *************** *** 27728,27747 **** strencode2(str2, command, sizeof(str2)); strencode2(str3, full_name, sizeof(str3)); ! ! if (strieq(str2,"Config") && just_registered == TRUE ) { ! /* this is the only time to skip the error that "Config" is not an allowed command...as the Config was really ! called in order to complete the self-registration ! ! now, reset the flag */ ! write_logfile(lbs,"In interprete() with just_registered==TRUE, resetting flag, skipping error message that user is not allowed to run command \"Config\""); ! just_registered = FALSE; ! } else { ! sprintf(str, "Error: Command \"%s\" is not allowed for uname \"%s\", full name \"%s\"", str2, uname,str3); ! write_logfile(lbs, str); ! ! sprintf(str, loc("Error: Command \"<b>%s</b>\" is not allowed for login \"<b>%s</b>\", user \"<b>%s</b>\""), str2,uname,str3); ! show_error(str); ! return; ! } } --- 27712,27718 ---- strencode2(str2, command, sizeof(str2)); strencode2(str3, full_name, sizeof(str3)); ! sprintf(str, loc("Error: Command \"<b>%s</b>\" is not allowed for user \"<b>%s</b>\""), str2, str3); ! show_error(str); ! return; }
ELOG V3.1.5-3fb85fa6