Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 194 of 238  Not logged in ELOG logo
icon4.gif   elog utility for submission used wrong 'Host:' in POST header, posted by Heiko Scheit on Mon Jul 11 19:04:38 2005 
The 'elog' utility for commandline submission used wrong 'Host:' in POST header.
The host listed after 'Host:' should be the host where the server runs, not the 
localhost (see patch below).

$ diff -u elog.c_20050711  elog.c
--- elog.c_20050711     Mon Jul 11 18:54:20 2005
+++ elog.c      Mon Jul 11 18:55:31 2005
@@ -421,7 +421,7 @@
       sprintf(request + strlen(request), "%s/%d?cmd=download", experiment, message_id);
    strcat(request, " HTTP/1.0\r\n");
 
-   sprintf(request + strlen(request), "Host: %s\r\n", host_name);
+   sprintf(request + strlen(request), "Host: %s\r\n", host);
    sprintf(request + strlen(request), "User-Agent: ELOG\r\n");
 
    first = 1;
@@ -872,7 +872,7 @@
    strcat(request, " HTTP/1.0\r\n");
 
    sprintf(request + strlen(request), "Content-Type: multipart/form-data; boundary=%s\r\n", boundary);
-   sprintf(request + strlen(request), "Host: %s\r\n", host_name);
+   sprintf(request + strlen(request), "Host: %s\r\n", host);
    sprintf(request + strlen(request), "User-Agent: ELOG\r\n");
    sprintf(request + strlen(request), "Content-Length: %d\r\n", content_length);
    icon4.gif   Re: elog utility for submission used wrong 'Host:' in POST header, posted by Emiliano Gabrielli on Tue Jul 12 10:15:30 2005 
> The 'elog' utility for commandline submission used wrong 'Host:' in POST header.
> The host listed after 'Host:' should be the host where the server runs, not the
> localhost (see patch below).
>
> $ diff -u elog.c_20050711 elog.c
> --- elog.c_20050711 Mon Jul 11 18:54:20 2005
> +++ elog.c Mon Jul 11 18:55:31 2005
> @@ -421,7 +421,7 @@
> sprintf(request + strlen(request), "%s/%d?cmd=download", experiment, message_id);
> strcat(request, " HTTP/1.0\r\n");
>
> - sprintf(request + strlen(request), "Host: %s\r\n", host_name);
> + sprintf(request + strlen(request), "Host: %s\r\n", host);
> sprintf(request + strlen(request), "User-Agent: ELOG\r\n");
>
> first = 1;
> @@ -872,7 +872,7 @@
> strcat(request, " HTTP/1.0\r\n");
>
> sprintf(request + strlen(request), "Content-Type: multipart/form-data; boundary=%s\r\n", boundary);
> - sprintf(request + strlen(request), "Host: %s\r\n", host_name);
> + sprintf(request + strlen(request), "Host: %s\r\n", host);
> sprintf(request + strlen(request), "User-Agent: ELOG\r\n");
> sprintf(request + strlen(request), "Content-Length: %d\r\n", content_length);

This is not completally true IMHO .. better, it is, but it is not the only problem.

Elog seems to speak HTML/1.0, where "host:" is not implemented ... Since ELOG does not support Vhosts I think the right beaviour is to remove the "Host:" header at all ...

On the other hand it should replay with an error when a bogus client tries to speak HTML/1.0 specifing "host:",
and (the wrost case) when the bogus client says to speak HTML/1.1 and doesnt provide the required "Host:" header ...
Yes .. elog will ignore it, but it is an RFC requirement for HTML/1.1 !
       icon2.gif   Re: elog utility for submission used wrong 'Host:' in POST header, posted by Stefan Ritt on Wed Jul 20 21:03:29 2005 

Emiliano Gabrielli wrote:
This is not completally true IMHO .. better, it is, but it is not the only problem.

Elog seems to speak HTML/1.0, where "host:" is not implemented ... Since ELOG does not support Vhosts I think the right beaviour is to remove the "Host:" header at all ...


So I remove the Host: ... line at all, I hope this is ok with everybody.
icon3.gif   Cannot stat() config file , posted by Stefan Rudat on Wed Jul 20 08:32:06 2005 
Hi

Elog runs now for serveral month without any problem at a Windows 2000 server.
I must change the access rights for all Folders, remove the user everyone and set the
Rights only to defined groups .
Now I can see following Event ID

Event Type: Information
Event Source: ELOG
Event Category: None
Event ID: 0
Date: 20.07.2005
Time: 08:14:24
User: N/A
Computer: SNDSRV1
Description:
The description for Event ID ( 0 ) in Source ( ELOG ) cannot be found.
The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: Cannot stat() config file; No such file or directory.

My question now. Have someone see the same Problem ?
It this is a access right problem How to set up the access rights for Elog
Elog folders ?

Bye
    icon2.gif   Re: Cannot stat() config file , posted by Stefan Ritt on Wed Jul 20 20:13:26 2005 

Stefan Rudat wrote:
Cannot stat() config file; No such file or directory.


I do not know what exactly is going on. This error occurs during runtime when elog tries to check if the config file (usually elogd.cfg) has changed. It checks if the file is there on startup, but apparently it is there, otherwise elog would not start. Then it checks about once per second if the file access time has changed. If so, it rereads the file. This way changes to the file become valid immediately, without restarting elog. The fact that elog has access to the file on startup, but not later, is somehow strange. Maybe you lock this file with an editor, or it is on a network drive which gets disconnected, or the permission changed after the startup. Something in that direction.
icon1.gif   short/long_name should point the same user, posted by Emiliano Gabrielli on Thu Jul 14 12:47:06 2005 
.. I mean that if I use:
Restrict edit                 = 1
; preset author and email
Preset Author                 = $short_name
Preset Author Email           = $user_email
Preset on reply Author        = $short_name
Preset on reply Author Email  = $user_email
Subst on reply subject        = Re: $subject

; these attributes cannot be changed
Locked Attributes             = Author, Author Email

and then I change Preset Author to be "$long_name" Elog does not permit the autor to edit an old post of its own ...
It is not able to argue that short and long name are the same person..

Yes I know, you'll ask me why I should change it .. the anwer is.. I don't have to, but (as I could do it logically) I'd like to be able to do..

In my case I changed it by error, people inserted entries and now I restored the correct one .. so now I have to unlock the attribute and change every Author by hand as admin
Smile
    icon1.gif   Re: short/long_name should point the same user, posted by Emiliano Gabrielli on Thu Jul 14 13:05:33 2005 

Emiliano Gabrielli wrote:
.. I mean that if I use:
Restrict edit                 = 1
; preset author and email
Preset Author                 = $short_name
Preset Author Email           = $user_email
Preset on reply Author        = $short_name
Preset on reply Author Email  = $user_email
Subst on reply subject        = Re: $subject

; these attributes cannot be changed
Locked Attributes             = Author, Author Email

and then I change Preset Author to be "$long_name" Elog does not permit the autor to edit an old post of its own ...
It is not able to argue that short and long name are the same person..

Yes I know, you'll ask me why I should change it .. the anwer is.. I don't have to, but (as I could do it logically) I'd like to be able to do..

In my case I changed it by error, people inserted entries and now I restored the correct one .. so now I have to unlock the attribute and change every Author by hand as admin
Smile



a problem related to this issue is that an attribute of userlist type automatically sets the user to be in the long form..

My proposal is to alwais store users in the long form and anly give the possibility to use the short or long form in displaing time..
    icon2.gif   Re: short/long_name should point the same user, posted by Stefan Ritt on Thu Jul 14 17:34:12 2005 

Emiliano Gabrielli wrote:
In my case I changed it by error, people inserted entries and now I restored the correct one .. so now I have to unlock the attribute and change every Author by hand as admin
Smile


Well, that teaches you not to do this error again Wink
       icon2.gif   Re: short/long_name should point the same user, posted by Emiliano Gabrielli on Thu Jul 14 19:11:54 2005 

Stefan Ritt wrote:

Emiliano Gabrielli wrote:
In my case I changed it by error, people inserted entries and now I restored the correct one .. so now I have to unlock the attribute and change every Author by hand as admin
Smile


Well, that teaches you not to do this error again Wink


uhm.. I think the confusion intrinsict in elog between long and short name is something to be solved ..
an attribute of type "userlist" fills always with the long_name .. but if I would to insert it as short ?

the users shown in the users admin dropdown menu is short .. why? .. may be I didnt understood the way this issue works .. Crying
          icon2.gif   Re: short/long_name should point the same user, posted by Stefan Ritt on Thu Jul 14 20:24:07 2005 

Emiliano Gabrielli wrote:
uhm.. I think the confusion intrinsict in elog between long and short name is something to be solved ..
an attribute of type "userlist" fills always with the long_name .. but if I would to insert it as short ?

the users shown in the users admin dropdown menu is short .. why? .. may be I didnt understood the way this issue works .. Crying


The "short name" is the equivalent to the unix login name. Under /etc/passwd, you have a login (short) name and a "full" (long) name. The first may not contain blanks, must be unique, while the second is more like a "real" name. This concept has been adapted in elog. While many people use cryptic or abbreviated login names, it's still nice know the real name, like if you get an email notification from someone. The userlist fills with the long_name because people refer to other people in the logbook usually with the real name (sometimes they even don't know the people's login name). The admin dropdown menu uses the short names because you look at the user database more from an administration point of view. Like if you edit /etc/passwd, you first look at the login name, not the full one. Maybe what one could add is to make the full name in the admin page a dropdown list as well, so the admin can either select the short or the long name. Another item for the wishlist Crying
             icon2.gif   Re: short/long_name should point the same user, posted by Emiliano Gabrielli on Fri Jul 15 15:03:01 2005 

Stefan Ritt wrote:

Emiliano Gabrielli wrote:
uhm.. I think the confusion intrinsict in elog between long and short name is something to be solved ..
an attribute of type "userlist" fills always with the long_name .. but if I would to insert it as short ?

the users shown in the users admin dropdown menu is short .. why? .. may be I didnt understood the way this issue works .. Crying


The "short name" is the equivalent to the unix login name. Under /etc/passwd, you have a login (short) name and a "full" (long) name. The first may not contain blanks, must be unique, while the second is more like a "real" name. This concept has been adapted in elog. While many people use cryptic or abbreviated login names, it's still nice know the real name, like if you get an email notification from someone. The userlist fills with the long_name because people refer to other people in the logbook usually with the real name (sometimes they even don't know the people's login name). The admin dropdown menu uses the short names because you look at the user database more from an administration point of view. Like if you edit /etc/passwd, you first look at the login name, not the full one. Maybe what one could add is to make the full name in the admin page a dropdown list as well, so the admin can either select the short or the long name. Another item for the wishlist Crying


uhmm .. what I am talking about is something simpler ... It seems to me that elog does not use always the "login name" but somethins refers to the "gecos" ... What I'm askinf for is to separe the login name (to which elog has to refer for everything internally) and the long/short_name mechanism that should be a mere display issue ...

May be that it is the same to ask for the introdution of a "user_id" or to treat the login name as the uid, .. the "Author" field should be filled both with the long and the short name (and it is so now!) but, when checking the original author on a Edit action, aelog as to check always the actual logged *short* name against the original Author *short* name .. becoise is only the short name that should have a sense for messages .. the long one is only a nice reminder Smile

Hope my english makes me to be understod now Wink
icon3.gif   userlist multiple select, posted by Emiliano Gabrielli on Mon Jul 11 09:52:52 2005 
Here I am again Smile

My goal is to put a "Co-Authors" Attribute in my logbook, giving the possibility to other people in the control room to have credits about an entry... I added a "Co-Author" attribute, but It shold permit a "multliple" selection (a checkbox is not good) ... the perfect solution would be to add the attribute "multiple" to the <select> tag, and filling the elog Attribute value with a comma separated list of the selections ...

tnx in advance Smile
    icon3.gif   Re: userlist multiple select, posted by Stefan Ritt on Mon Jul 11 12:40:13 2005 

Emiliano Gabrielli wrote:
Here I am again Smile

My goal is to put a "Co-Authors" Attribute in my logbook, giving the possibility to other people in the control room to have credits about an entry... I added a "Co-Author" attribute, but It shold permit a "multliple" selection (a checkbox is not good) ... the perfect solution would be to add the attribute "multiple" to the <select> tag, and filling the elog Attribute value with a comma separated list of the selections ...

tnx in advance Smile


Have you tried
MOptions ...
which gives you check boxes where more than one can be selected?

I presume you have, but you really would prefer a multi-selection box instead of multiple check boxes Wink . Well, let's make a deal: if you explain everybody how to do a selection in a multi-select box (with all the Shift-Click, CTRL-Click, and this under different operating systems), I will implement it Big grin
       icon3.gif   Re: userlist multiple select, posted by Emiliano Gabrielli on Mon Jul 11 14:35:00 2005 

Stefan Ritt wrote:

Emiliano Gabrielli wrote:
Here I am again Smile

My goal is to put a "Co-Authors" Attribute in my logbook, giving the possibility to other people in the control room to have credits about an entry... I added a "Co-Author" attribute, but It shold permit a "multliple" selection (a checkbox is not good) ... the perfect solution would be to add the attribute "multiple" to the <select> tag, and filling the elog Attribute value with a comma separated list of the selections ...

tnx in advance Smile


Have you tried
MOptions ...
which gives you check boxes where more than one can be selected?

I presume you have, but you really would prefer a multi-selection box instead of multiple check boxes Wink . Well, let's make a deal: if you explain everybody how to do a selection in a multi-select box (with all the Shift-Click, CTRL-Click, and this under different operating systems), I will implement it Big grin


a multiple selection box it's a standard web tool .. if one is not able to use its browser is not an elog problem IMHO Tongue

My request is becouse having a number of user (say 20) makes the checkbox solution very very nasty .. again, it's a choice you give to the smart user .. others simply will not notice any change in elog Wink
          icon2.gif   Re: userlist multiple select, posted by Stefan Ritt on Tue Jul 12 15:19:07 2005 

Emiliano Gabrielli wrote:
a multiple selection box it's a standard web tool .. if one is not able to use its browser is not an elog problem IMHO


Really? Can you point me to a common web site using this? I would really like to see how other people use this.


Emiliano Gabrielli wrote:
My request is becouse having a number of user (say 20) makes the checkbox solution very very nasty .. again, it's a choice you give to the smart user .. others simply will not notice any change in elog Wink


Ok, I put it on my wishlist. If more than one person asks for this, I will implement it. Unfortunately it's not only putting a multiple into the HTML page, it's also a different way how multiple selections are passed in the POST form and their decoding, so it will be an hour or two of work for me.
             icon2.gif   Re: userlist multiple select, posted by Emiliano Gabrielli on Wed Jul 13 10:12:38 2005 

Stefan Ritt wrote:

Emiliano Gabrielli wrote:
a multiple selection box it's a standard web tool .. if one is not able to use its browser is not an elog problem IMHO


Really? Can you point me to a common web site using this? I would really like to see how other people use this.


I can't remember just now a web site using it .. what I mean is that "multiple" attribute for the "select" tag is a standard for the web (it's not an IE extension or so on ..) so every web browser implements it.

It's normally used, for example, when you fill a form describing your attitudes, here you can often choose from a select box a number of interest you are concerded.. but it is only an example

Stefan Ritt wrote:


Emiliano Gabrielli wrote:
My request is becouse having a number of user (say 20) makes the checkbox solution very very nasty .. again, it's a choice you give to the smart user .. others simply will not notice any change in elog Wink


Ok, I put it on my wishlist. If more than one person asks for this, I will implement it. Unfortunately it's not only putting a multiple into the HTML page, it's also a different way how multiple selections are passed in the POST form and their decoding, so it will be an hour or two of work for me.

Yes I know, uhm... if you point me to the right piece of code to be adjusted I can see if I'll be able to do the job Smile
icon3.gif   Suppress Email notification checkbox, posted by Gary Clayson on Thu Jul 7 05:30:24 2005 
Hello All. Stefan, would it be possible to add one more option to the Suppress Default flag? I'd appreciate a setting that would suppress emails being sent and remove the option from the page. Or, has this been accomplished? And, if so, what is that setting. Thanks in advance!! Keep up the great work.

Gary ;->
    icon2.gif   Re: Suppress Email notification checkbox, posted by Stefan Ritt on Thu Jul 7 22:02:52 2005 

Gary Clayson wrote:
Hello All. Stefan, would it be possible to add one more option to the Suppress Default flag? I'd appreciate a setting that would suppress emails being sent and remove the option from the page. Or, has this been accomplished? And, if so, what is that setting. Thanks in advance!! Keep up the great work.


I added
Suppress default = 3

which always suppresses email notifications. The addition is under CVS and will be included in the next release.

- Stefan
       icon14.gif   Re: Suppress Email notification checkbox, posted by Gary Clayson on Fri Jul 8 22:20:19 2005 

Stefan Ritt wrote:

Gary Clayson wrote:
Hello All. Stefan, would it be possible to add one more option to the Suppress Default flag? I'd appreciate a setting that would suppress emails being sent and remove the option from the page. Or, has this been accomplished? And, if so, what is that setting. Thanks in advance!! Keep up the great work.


I added
Suppress default = 3

which always suppresses email notifications. The addition is under CVS and will be included in the next release.

- Stefan


Thanks Stefan.
       icon2.gif   Re: Suppress Email notification checkbox, posted by Gary Clayson on Tue Jul 12 17:41:30 2005 

Stefan Ritt wrote:

Gary Clayson wrote:
Hello All. Stefan, would it be possible to add one more option to the Suppress Default flag? I'd appreciate a setting that would suppress emails being sent and remove the option from the page. Or, has this been accomplished? And, if so, what is that setting. Thanks in advance!! Keep up the great work.


I added
Suppress default = 3

which always suppresses email notifications. The addition is under CVS and will be included in the next release.

- Stefan


Hello Stefan. I used this setting with the beta2 version and it works great. THANX!!! Many kudos to you for an elegant solution to the logging 'problem'.
icon4.gif   icon comment not display using firefox, posted by Laurent S. Nadolski on Mon Jul 11 11:16:59 2005 
Hi,

I found out the following bug.
Icon comment are not displayed when browsing with firefox. But it works fine with IE.
A goo test page is this very elog entry.
If you move your mouse on a icon nothing will be displayed using Firefox.

In the following example, I noticed, that the tooltip Icon is displayed instead (whenever existing).
This means, it displays info (for all icons if several) and not "showbug" on icon1.gif

Attributes = Icone
IOptions Icone = icon1.gif
Tooltip Icone = info
Icon comment icon1.gif = showbug

Thanks for your help,

Laurent.
    icon2.gif   Re: icon comment not display using firefox, posted by Stefan Ritt on Mon Jul 11 12:35:40 2005 

Laurent S. Nadolski wrote:
I found out the following bug.
Icon comment are not displayed when browsing with firefox. But it works fine with IE.
A goo test page is this very elog entry.
If you move your mouse on a icon nothing will be displayed using Firefox.


Thanks for reporting this bug. I fixed it in the current CVS version. You can try it with this page.


Laurent S. Nadolski wrote:
In the following example, I noticed, that the tooltip Icon is displayed instead (whenever existing). This means, it displays info (for all icons if several) and not "showbug" on icon1.gif

Attributes = Icone
IOptions Icone = icon1.gif
Tooltip Icone = info
Icon comment icon1.gif = showbug

Icon comment
is used for email notification, and
Tooltip
is used for tooltips. So the behaviour you describe is intentional.

- Stefan
icon3.gif   show/hide attachments, posted by Emiliano Gabrielli on Sat Jul 9 17:21:51 2005 
It would be nice ad usefull to have a "show/hide attachments" just at the side of "show only last" link ..
BTW, it would be nice if those settings would be stored in a cooky too Smile

thanx againg Stefan
icon1.gif   Subst on Reply, posted by Emiliano Gabrielli on Fri Jul 8 10:52:36 2005 
the "subst on reply" parameter seems to correctly work only on the first reply..
since the second reply has the author locked to the one having replyed the first time.

Here is my config:
; preset author and email
Preset Author                 = $short_name
Preset Author Email           = $user_email
Subst on reply Author         = $short_name
Subst on reply Author Email   = $user_email
Subst on reply subject        = Re: $subject

; these attributes cannot be changed
Locked Attributes             = Author, Author Email
Fixed Attributes Reply        = Subject

My poor man solution is for now to allow everyone to change the author (unlock the field ..)
    icon1.gif   Re: Subst on Reply, posted by Stefan Ritt on Fri Jul 8 22:38:51 2005 

Emiliano Gabrielli wrote:
the "subst on reply" parameter seems to correctly work only on the first reply..
since the second reply has the author locked to the one having replyed the first time.

Here is my config:
; preset author and email
Preset Author                 = $short_name
Preset Author Email           = $user_email
Subst on reply Author         = $short_name
Subst on reply Author Email   = $user_email
Subst on reply subject        = Re: $subject

; these attributes cannot be changed
Locked Attributes             = Author, Author Email
Fixed Attributes Reply        = Subject

My poor man solution is for now to allow everyone to change the author (unlock the field ..)


You need
Preset on reply Author = $short_name
. Subst is supposed to work after a submission, Preset before you open the edit mask. See this forum. If you reply to this entry, your name appears as the Author even if it's locked. Here is the config:
Preset Author = $long_name
Preset Author Email = $user_email
Preset on reply Author = $long_name
Preset on reply Author Email = $user_email
Locked Attributes = Author

The Subst can be used for your image category thing. So instead using
Display Category = $category <img src="icons/$category.png" border="0">

you can use
Subst Category = $category <img src="icons/$category.png" border="0">

which physically rewrites the category. This is probably not what you want, but take it as an example. We use it in one place to replace a user name by a link to our internal telephonbook searching for this username, so if one clicks on the user, one ends up in the user's telephonebook entry.
       icon1.gif   Re: Subst on Reply, posted by Emiliano Gabrielli on Sat Jul 9 14:13:10 2005 

Stefan Ritt wrote:

You need
Preset on reply Author = $short_name
. Subst is supposed to work after a submission, Preset before you open the edit mask. See this forum. If you reply to this entry, your name appears as the Author even if it's locked. Here is the config:
Preset Author = $long_name
Preset Author Email = $user_email
Preset on reply Author = $long_name
Preset on reply Author Email = $user_email
Locked Attributes = Author

The Subst can be used for your image category thing. So instead using
Display Category = $category <img src="icons/$category.png" border="0">

you can use
Subst Category = $category <img src="icons/$category.png" border="0">

which physically rewrites the category. This is probably not what you want, but take it as an example. We use it in one place to replace a user name by a link to our internal telephonbook searching for this username, so if one clicks on the user, one ends up in the user's telephonebook entry.


Ok it's working perfectly, my bad Iwas lost in the huge set of config parameters elog accept the first time I installed it Smile

Thank you so much Stefan
ELOG V3.1.5-3fb85fa6