Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 224 of 806  Not logged in ELOG logo
ID Date Icon Author Author Emaildown Category OS ELOG Version Subject
  66163   Wed Jan 21 08:45:25 2009 Reply Stefan Rittstefan.ritt@psi.chBug reportLinux2.7.5 2142Re: Elogd crashes with: *** stack smashing detected ***

 

Niklas wrote:

Create a list of elog cookies, and store only these as parameters. Examplef:

int process_http_request(const char *request, int i_conn)

{
...
const char *cookie_list[] = { "upwd", "unm", "elmode", "urem", "wpwd", "apwd", "uname", NULL };
...
...
...
         /* store cookie as parameter */
         for(i=0; cookie_list[i]; i++) {
            if(strcmp(cookie_list[i], str) == 0) {
               setparam(str, cookie);
               break;
            }
         }

...

 

I'm not sure if this works, since your test

i < (int) sizeof(cookie)

still will stop parsing cookies if there is one which is too long. So I added your test plus changed the parsing to:

for (i = 0; *p && *p != ';' && *p != '\r' && *p != '\n' ; )

   if (i < (int) sizeof(cookie)-1)

      cookie[i++] = *p++;

   cookie[i] = 0;

 


The modification is in the curren SVN revision (# 2162). So have a look and check that it works.

  66165   Wed Jan 21 14:31:01 2009 Reply Stefan Rittstefan.ritt@psi.chBug reportWindows2.7.5Re: Stack error when email notification is active

 

Michael Ambrus wrote:

 

Michael Ambrus wrote:

 

Stefan Ritt wrote:

 

Michael Ambrus wrote:

Stack error is caused when an entry is submitted in a e-mail notification enabled log when a new entry is submitted. This error does not happen on linux (same Elog version, same config file).

Please let me know if there is anything I can do to help.

 

-----------------------------2916890032591
Content-Disposition: form-data; name="attfile"; filename=""
Content-Type: application/octet-stream


-----------------------------2916890032591--

timezone: 0, offset: 0
      6 [main] elogd 2816 _cygtls::handle_exceptions: Error while dumping state
(probably corrupted stack)
Segmentation fault (core dumped)

 

Cygwin is not officially supported. Can you try the Windows binaries? 

 

Sorry, I didn't know there were any (I've not used Elog for years and I think Cygwin was the only way back then). Tried them now and they seem to work. At least no stack error is caused. I'm getting some other error, but I think it's the handshake with the SMTP. I'll validate it's OK until tomorrow.

Windows binaries also solved the issue with the "Top grop" in my other bug rapport.

Thanks for the help!

 

 

 

Unfortunately can't validate this right now. I'm at a remote network trying to get ELOG on my Windows laptop working with e-mail notifications. Either my normal ISP will not allow the SMTP to accept relaying from external networks, or something else is wrong.

The Windows binary is behaving somewhat differently, it seems to behave like earlier versions. I.e. the error message seen on the browser (Error sending Email via "smtp.xxx.xxx") is very limited. Logging (level 6) will not revile much and -v doesn't output any hints either. Assuming the first possible cause, I registered a account at gmail to try see if their SMTP would allow e-mail relaying. Trying with the Windows binary version I seemingly leads to the same result (i.e. I don't see much and the error seen at the browser is the same). However, when trying to run ELOG on a machine at my home network the message is different:

Error sending Email via "smtp.gmail.com": 5.7.0 Must issue a STARTTLS command first. w40sm7583927ugc.6

The message does not surprise me (from previous experience, TLS was what made made postfix complicated to set up too). But what does surprise me is that the messages differ between the two (ELOG V2.7.5 running on a Linux machine and the Windows binary of the same version). Does Linux/Windows versions differ by conditionals in the code or did I somehow get an older Windows binary?

It would also be helpful knowing if ayone has got ELOG working with smtp.gmail.com.

Regards /Michael

 

The Windows Binaries are not recompiled for each minor modification. You should check the SVN revistion (the number which shows up at the very bottom of the page, which is 2153 in this case). It might well be that the Windows Binaries do not yet contain the modification for extended SMTP error report.

Furthermore, TLS is not supported in elogd, only plain SMTP is possible. 

  66166   Thu Jan 22 09:30:13 2009 Reply Stefan Rittstefan.ritt@psi.chQuestionWindows2.7.5-2130Re: Import csv with another date

 

Michael Dannmeyer wrote:

Hello,

i have problems with importing csv files. What i want to do is the following:

Import a list of log entries from a csv file with another date like the actual date

I tried to do this but the only thing which happend was that all the entries have the actual date in elog. Then i created a seperate Date column in the csv file an tried to import this.

It worked but in the default date column i have the import date and in a second date column i have the date from the csv file.

Is there a chance to get the csv column imported in the standard Date field? 

Or is there a possibility to hide/supress the default date field and only display the imported date field?

Thanks

Michael

 

Importing dates from CSV files was not implemented for a good reason: There are dozens of date formats (such as "1/22/09", "Jan 1 2009", "Mon 1 January '09") and it is almost impossible to handle all formats. I changed now the code to catch at least some formats, such as the internal RFC2822 compliant date which is also used internall by elog. An example of this format is "Thu, 22 Jan 2009 09:26:00". This date format will also be used if you export a logbook via a CSV file. Another format I added is "1/22/09". So give a try to the new code (I made an intermediate release for windows V2.7.5-3) and see if it works for you.

  66168   Mon Jan 26 14:16:03 2009 Reply Stefan Rittstefan.ritt@psi.chQuestionWindowsV2.6.3Re: Default value radio button

 

Robert-Jan Schrijvers wrote:

Is it possible to attach a default value for a radio button when submitting a new form/record, for example: 

I now have an item "Confirmed" Yes/No, and I want the "no" option to be selected by default when a new form/record is created.
Does anyone know how to arrange this?

Thanks in advance!

You need something along these lines:

Attributes = ..., Confirmed
Options Confirmed = boolean
Preset Confirmed = 1 
  66172   Mon Jan 26 19:48:42 2009 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux2.7.4Re: restrict a field to upper or lower case

 

lisa giaime wrote:

Is it possiblet to restrict a field so that when a new record is added, whatever the user types is automatically converted to lower case?

 

No, this is not possible. 

  66175   Tue Jan 27 09:03:22 2009 Reply Stefan Rittstefan.ritt@psi.chQuestionWindows2.7.5-2168Re: more fun with SMTP and authentication....
> For authentication via the Windows IIS I have "basic authentication" with no TLS encryption required - I'm 
> not sure if that meets the provider's "SMTP authentication" requirement.  When I was using the previous version 
> of ELOG (sorry, I did not note the version number) the username was encrypted along with the password.  With 
> the 2168 build, the password is still encrypted but the usernamer is not; should the password be in "plain 
> text" as well?  

I changed only the screen output. The username is printed not not encrypted, to be able to check it by eye. The 
username sent over the network is and was always encrypted.

The only clue I have is to compare the network traffic you get with an email client (outlook, thunderbird ??) 
with the network traffic you get from elogd. To monitor the traffic, I use normally WireShark (formerly Ethereal, 
www.wireshark.org). You have to filter for "tcp.port == 25" which is SMTP, then capture your traffic, right-
click on it and select "Follow TCP stream". The result you see in the attachment. The strings produced by elogd 
are pink, the strings from the SMTP server are blue. In my case I don't have authentication (our SMTP server does 
not support this). In you case, you have to compare the traffic from a functioning email client with elogd.
Attachment 1: Capture.png
Capture.png
  66176   Tue Jan 27 09:19:22 2009 Reply Stefan Rittstefan.ritt@psi.chBug fixLinux2.7.5Re: convert: unrecognized option '-set'
> Hello,
> 
> We are now running elog-2.7.5 in a Scientific Linux 4 (RHEL4) system, which uses ImageMagick 6.0.7.1.  After uploading an image, the image 
> manipulation buttons don't work and complain:
> convert: unrecognized option '-set'
> 
> We are using an RPM built from source, and it looks like I should be able to just change "-set comment ..." to "-comment" as in:
> ------
> [dab66@lnx100 tmp]% diff elogd.c elogd.c.new 
> 22601c22601
> <       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -set comment ' %d' '%s'", file_name, new_rot,
> ---
> >       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -comment ' %d' '%s'", file_name, new_rot,
> 22607c22607
> <       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -set comment ' %d' '%s'", file_name, new_rot,
> ---
> >       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -comment ' %d' '%s'", file_name, new_rot,
> 22618c22618
> <       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -set comment ' %d' '%s'", file_name, cur_rot,
> ---
> >       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -comment ' %d' '%s'", file_name, cur_rot,
> 22624c22624
> <       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -set comment ' %d' '%s'", file_name, cur_rot,
> ---
> >       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -comment ' %d' '%s'", file_name, cur_rot,
> ------
> 
> Is there any better way for us to fix this, or is anything else needed?

Well, I believe your modification won't work. I just tried it with ImageMagick 6.3.8 and it failed. Try to rotate your picture four times, and 
it should be back to the old position. When I use "-comment" instead "-set comment" on a PNG file, this did not work. From the man page it 
tells me:

Version: ImageMagick 6.3.8 01/25/08 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

Usage: convert [options ...] file [ [options ...] file ...] [options ...] file

Image Settings:
  ...
  -comment string      annotate image with comment
  ...

Image Operators:
  ...
  -set property value  set an image property
  ...


So indeed "-comment" and "-set comment" are two different things. I'm afraid you have to upgrade your ImageMagick package in order to make 
this work.
  66179   Tue Jan 27 15:45:52 2009 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux2-7-5Re: Last day -- list menu command

 

Mike Forster wrote:

 Hi folks, 

I want to have Last day be a command in the List display, so I added:

List menu commands = New, Find, Import, Login, Logout, Config, Last day, Help

However, when Last day is selected, the command does not change to Last 2 days.
What is the right way to do this?

 

You have to put "Last x" in the menu, not "Last day". Unfortunately by default the label "Last day" does not show up. I fixed this in the current version. But you can yourself start this thing by adding "past1" to the URL, or by making yourself a bookmark in your browser. Like

https://midas.psi.ch/elogs/Forum/past1

then the "Last 2 days" will show up.

ELOG V3.1.5-3fb85fa6