Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 725 of 808  Not logged in ELOG logo
icon3.gif   Can other pages hide behind elog user authentication?, posted by Jason St. John on Sat Apr 17 01:06:58 2010 

Hello,

The elog security suits me just fine: the content is not available unless users have logged in, and as administrator I have complete control over who that is and what their privileges are. I can easily share somewhat sensitive notes, plots, and findings without making them completely open to the world. 

I have a project which generates html pages, which I'm also not really supposed to make public to the world.  I'd rather not resort to attaching them to elog entries.

Could the elog security be extended to control access to other files I put on the server? 

Thanks,

-jmsj

icon3.gif   Custom input forms implementation, posted by Stefan Ritt on Fri Sep 17 06:19:39 2010 Capture.pngelogd.cfgIMAG0036.jpgshiftcheck.html

Dear ELOG users,

starting with SVN revision 2328, custom input forms are implemented. This allows application specific formats for check lists etc. In our specific case we had to implement a shift check list, which was quite long. Furthermore the check list should be optimized for an iPad, which we take in the field and record various checks and readings (in our case some gas pressure gauges at the PSI particle accelerator). Since the standard ELOG interface was too inflexible, a completely hand-written form was needed. The form can be activated by the new configuration options Custom New Form, Custom Edit Form and Custom Display Form, one for a new entry, an entry to edit and and entry to display. In our case we used the same form for all three cases. This is how the shift check list looks under the Safari Browser on a PC:

Capture.png 

And here is how it looks on the iPad:

IMAG0036.jpg

Each section can be collapsed and expanded (blue arrows at the left), and various internal checks are made before the check list can be submitted.

Implementing such forms is however more something for the advanced user, since you have to hand-write HTML with CSS and JavaScript code. It can then however be a powerful method for check lists. Please find in the attachments the elogd.cfg configuration for that logbook and the shiftcheck.html source code file. It is a bit complicated since the page is a static page, elogd just serves it from the file. This requires all the dynamic functions to be implemented inside the HTML file with JavaScript. To display an entry for example, the JavaScript loads the raw data with the "?cmd=Download" command and the populates the form fields. The collapsing and expanding is done by using CSS properties. The integrated style sheet was optimized for the rendering on an iPad. Rather large fonts were chosen so that the items can be checked easily with your finger tips. Various parameters are sent between the browser and the elogd program via hidden fields and cookies. So only something for experts! But if you go through the effort and hand-write the form, it can be very handy. Note that you have to upgrade to SVN revision 2328 for the three new options.

 

icon3.gif   Modification aren't accepted, posted by bob on Wed Jan 19 16:03:38 2011 

hello,

At home, when I change the config *. cfg, the modifications are not taken in consideration

Have you got a idea ?

Thanks a lot !

Bob

icon3.gif   Wishlist: Roption, posted by David Pilgram on Thu Jan 20 18:51:53 2011 
Hi Stefan,

Roptions, or Radio Buttons.  Do you recall that on old
radios, if you gently pressed a button you could release whichever
button was already in, without selecting the new button; in other
words no selection made.

I'd like this same facility with elog.  Now I know that it can be
done by (for example) in the config file preselecting one of the
selections on reply- or indeed one that does not exist to "clear" it, 
but in this case that is not the route I'd want to take every time.

What I'd like is a (optional) button along with all the others, which 
if you click on it, it will clear any selection for that particular Roption.  
At present, once an Roption has been selected, it will persist in all 
replies unless or until an alternative choice is made.  Alternatively, if 
no selection has been made, then there is no selection on the reply, either. 
[Unless something in the elog.cfg file].

Regards,

David.
 
icon3.gif   my_shell (OS_UNIX) uses /tmp/elog_shell - conflict when more than one elogd runs at the same time, posted by John M O'Donnell on Fri May 20 22:45:00 2011 elogd.c.patch_shellPipe

all instances of elogd use the same file name in /tmp when calling my_shell.  This can cause some inconsistent behavior when two or more copies of elogd are runnnig at the same time.  (eg. one might detect ImageMagik is installed, and the other not,)

 

The propsed solution is to have the parent read from a pipe to the child rather from a file.  A patch is attached.

icon3.gif   Integrate Latex Formula Editor plugin, posted by Andreas Luedeke on Wed Jun 15 11:10:01 2011 
There is a nice js plugin to create formulas with a latex editor.
This plugin (Can be found at http://www.codecogs.com/latex/integration/ckeditor/install.php) is for the CK Editor.
Currently the FCK Editor is used, which has been superseded in 2009 by the CK Editor.
It would be nice to change ELOG to use the newer CKEditor, in order to be able to use the formula plugin (and
maybe other plugins as well later).
    icon3.gif   Re: Elog crashes with URL find npp=0, posted by Andreas Luedeke on Tue Sep 13 13:38:19 2011 
> [...] It appears that npp=0 crashes elogd [...]

Here's a patch: search for "npp" in src/elogd.c and add the following line:
  if (n_page<=0) n_page = 20;

Here's the diff output for version 2.9.0-2414
*** 20092,20096 ****
     if (isparam("npp"))
        n_page = atoi(getparam("npp"));
+    if (n_page<=0) n_page = 20;

     if (page_mid) {
icon3.gif   el cheapo LDAP binding, posted by Christian Herzog on Fri Jan 27 14:05:09 2012 

Hi all,

 

we would like to hook elog to our LDAP server. Instead of writing a full-featured LDAP auth module for elog, I have the following idea: use Apache's LDAP module to require LDAP auth for a single logbook:

 

 <Location /elog/admin>

        Use PhysLDAP

        Use RequirePhysLDAPGroup isg


        RewriteEngine On

        RewriteCond %{LA-U:REMOTE_USER} (.+)

        RewriteRule . - [E=RU:%1]

        RequestHeader add X-Forwarded-User %{RU}e

</Location>
the two Use statements are Apache macros that define our LDAP settings. The last 4 lines are necessary for Apache to pass on the logged in user to the proxied elog (ends up in ENV X-Forwarded-User).
In elogd.c, I added 
 
   /* extract REMOTE_USER */

   if ((p = strstr(request, "X-Forwarded-User:")) != NULL) {

      p += 17;

      while (*p && *p == ' ')

         p++;

      strlcpy(remote_user, p, sizeof(remote_user));

      if (strchr(remote_user, '\r'))

         *strchr(remote_user, '\r') = 0;


         char sid[32];

         /* get a new session ID */

         sid_new(NULL, remote_user, (char *) inet_ntoa(rem_addr), sid);


         /* set SID cookie */

         set_sid_cookie(NULL, sid);

         // TODO: set lbs!

   }


to process_http_request in order to extract the LDAP login. I have managed to populate the author field with remote_user, but what I'd really like is to write a cookie containing this login name so that session handling kicks in. You can see that I attempt to write a cookie, but elogd segfaults at set_sid_cookie() (gdb backtrace: 
set_cookie (lbs=0x0, name=0x483b22 "sid", value=0x7ffffffd7590 "4831386B7B333A99", global=0, expiration=0x7ffffffd7300 "")
 
Would anyone be willing to help me with this? I'm not at all familiar with the program flow in elogd and my C is a bit rusty...
 
thanks,
-Christian
 
--
Dr. Christian Herzog <herzog@phys.ethz.ch>  support: +41 44 633 26 68
IT Services Group, HPT H 8                    voice: +41 44 633 39 50
Department of Physics, ETH Zurich
8093 Zurich, Switzerland                     http://nic.phys.ethz.ch/
 
 
ELOG V3.1.5-3fb85fa6