Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 197 of 234  Not logged in ELOG logo
icon4.gif   Segmentation fault when searching for empty regex, posted by Heiko Scheit on Mon Apr 11 13:52:29 2005 
Segmentation fault when searching for empty regex
--------------------------------------------------

Searching for a regex like 'm*', which also includes zero 'm's, an empty
expression is found indefinitely in 'highlight_searchtext(...)', which 
eventually results in an overflow of 'pt1'.  The patch below fixes this
particular problem, but I would guess there are many other regular 
expressions that would lead to an overflow of 'pt1', so its size
should definitely be checked before every 'strcpy(pt1,...)' and
the loop be aborted accordingly.  (Or 'pt1' should be allocated 
and enlarged dynamically.)

*** 14777,14782 ****
--- 14777,14784 ----
        if (status != REG_NOMATCH) {
           size = pmatch[0].rm_so;
  
+        if (size == 0) break; /* check for zero size -> infinite loop */
+ 
           /* copy first part original text */
           memcpy(pt1, pt, size);
           pt1 += size;
***************
*** 14788,14795 ****
--- 14790,14799 ----
           /* see also rsputs2(char* ) */
  
           if (hidden)
+          /* need to check size of pt1 !!! */
              strcpy(pt1,
"\001B\004style=\003color:black;background-color:#ffff66\003\002");
           else
+          /* need to check size of pt1 !!! */
              strcpy(pt1, "<B style=\"color:black;background-color:#ffff66\">");
  
           pt1 += strlen(pt1);
***************
*** 14802,14814 ****
--- 14806,14821 ----
  
           /* add coloring 2nd part */
           if (hidden)
+          /* need to check size of pt1 !!! */
              strcpy(pt1, "\001/B\002");
           else
+          /* need to check size of pt1 !!! */
              strcpy(pt1, "</B>");
           pt1 += strlen(pt1);
        }
     } while (status != REG_NOMATCH);
  
+    /* need to check size of pt1 !!! */
     strcpy(pt1, pt);
  }
    icon2.gif   Re: Segmentation fault when searching for empty regex, posted by Stefan Ritt on Mon Apr 11 21:22:25 2005 
I applied a similar fix like you proposed, just omit highlighting at all if I get a
zero length match. Changes committed to CVS.
icon5.gif   Lost cfg file, posted by David Egolf on Sat Apr 9 03:40:26 2005 
I was upgrading to the latest version and I wrote over my cfg file. I 
still have my database files. Is there a way to put the cfg file back 
together using the database files as a guide.  It did not seem to want to 
upgrade until I did this and I forgot to copy and then paste the cfg files 
back.  The latest version is now running. Before I did this I was still 
getting the old version number at the bottom of the main screen.  Also I 
have an RSS reader that can do user name and password, is this possible 
with Elog if the RSS reader has the ability?

Thanks

I guess this qualifies as two questions.

David Egolf
    icon2.gif   Re: Lost cfg file, posted by Stefan Ritt on Sat Apr 9 09:52:23 2005 
> I was upgrading to the latest version and I wrote over my cfg file. I 
> still have my database files. Is there a way to put the cfg file back 
> together using the database files as a guide.  It did not seem to want to 
> upgrade until I did this and I forgot to copy and then paste the cfg files 
> back.  The latest version is now running. Before I did this I was still 
> getting the old version number at the bottom of the main screen.  Also I 
> have an RSS reader that can do user name and password, is this possible 
> with Elog if the RSS reader has the ability?

I put an extra dialog box into the installer to prevent overwriting the
original config file, but unfortunately I cannot prevent people from shooting
themselves into the foot (;-)

The database files contain at least the attributes. Just open any file with a
text editor. But the other settings, like "preset <attribute>" etc. are lost.

Concerning teh RSS authentication, I willing to implement this if you tell me
which reader you are using, so that I can test it. You could also try yourself,
maybe it works without modification. What you would need is public read access
via "Guest menu commands" option plus a "Read password". The read password
prevents again the public read access, but the RSS reader can maybe submit it.
What the RSS reader certainly cannot do is to fill out the "Login" screen of
elog, so you need the "Guest menu commands" for sure.

- Stefan
       icon2.gif   Re: Lost cfg file, posted by David Egolf on Mon Apr 11 18:48:18 2005 
> > I was upgrading to the latest version and I wrote over my cfg file. I 
> > still have my database files. Is there a way to put the cfg file back 
> > together using the database files as a guide.  It did not seem to want to 
> > upgrade until I did this and I forgot to copy and then paste the cfg files 
> > back.  The latest version is now running. Before I did this I was still 
> > getting the old version number at the bottom of the main screen.  Also I 
> > have an RSS reader that can do user name and password, is this possible 
> > with Elog if the RSS reader has the ability?
> 
> I put an extra dialog box into the installer to prevent overwriting the
> original config file, but unfortunately I cannot prevent people from shooting
> themselves into the foot (;-)
> 
> The database files contain at least the attributes. Just open any file with a
> text editor. But the other settings, like "preset <attribute>" etc. are lost.
> 
> Concerning teh RSS authentication, I willing to implement this if you tell me
> which reader you are using, so that I can test it. You could also try yourself,
> maybe it works without modification. What you would need is public read access
> via "Guest menu commands" option plus a "Read password". The read password
> prevents again the public read access, but the RSS reader can maybe submit it.
> What the RSS reader certainly cannot do is to fill out the "Login" screen of
> elog, so you need the "Guest menu commands" for sure.
> 
> - Stefan

Hello,

Thank you so much for working with me on this.  The RSS reader I have been trying 
is at http://www.rssreader.com   and is version 1.0.88.0  It is a free RSS reader 
and seems to work very well.  It has a username and password system, but I am not 
sure what and how it will support with ELog. I have been successful in reading an 
open logbook with no passwords.  

Thanks again,

David Egolf
          icon2.gif   Re: Lost cfg file, posted by Stefan Ritt on Mon Apr 11 20:15:01 2005 rssreader.gif
> Thank you so much for working with me on this.  The RSS reader I have been trying 
> is at http://www.rssreader.com   and is version 1.0.88.0  It is a free RSS reader 
> and seems to work very well.  It has a username and password system, but I am not 
> sure what and how it will support with ELog. I have been successful in reading an 
> open logbook with no passwords.  

rssreader supports HTTP authentication. So what you have to do is to define a "read
password". Open a dos box, navigate to your elog directory, and enter

elogd -l <logbook> -r <password>

replace <logbook> with your real logbook name and <password> with any password. This
command modifies elogd.cfg and puts your password there in encrypted form.

Next, tell rssreader to use authentication and enter there your password
(authetication name does not matter). See the attachment. Rssreader will then be able
to connect properly to your logbook.
icon5.gif   Howto Set Default Fonts in Editor Window?, posted by Gregory M. Caughey on Sun Apr 10 07:35:09 2005 
Hello,
I have been running Elog for a long time on a variety of RedHat releases,
(this is a terrific project by the way). Currently running Elog v2.5.7 on 
RedHat (Fedora Core-II) and most is working great excepting being able to 
modify the default fonts being used by Elog when trying to write and save 
in text mode while in Elog's main editing screen. 

On my setup the font size is way too small and to work around this problem 
I write and save everything in HTML mode. I've browsed the Elog css file 
but don't yet see where or how to properly set the default font style or 
size for the main screen in the editor. Can you shed some light on this for 
me?

--
Regards, Greg
    icon2.gif   Re: Howto Set Default Fonts in Editor Window?, posted by Stefan Ritt on Sun Apr 10 09:36:07 2005 
> Hello,
> I have been running Elog for a long time on a variety of RedHat releases,
> (this is a terrific project by the way). Currently running Elog v2.5.7 on 
> RedHat (Fedora Core-II) and most is working great excepting being able to 
> modify the default fonts being used by Elog when trying to write and save 
> in text mode while in Elog's main editing screen. 
> 
> On my setup the font size is way too small and to work around this problem 
> I write and save everything in HTML mode. I've browsed the Elog css file 
> but don't yet see where or how to properly set the default font style or 
> size for the main screen in the editor. Can you shed some light on this for 
> me?

The text style of the main message text is defined in the following lines in the
CSS field:

.messagepre {
  font-family:'lucida console',courier,monospace;
  font-size:10pt;
}

Locate these lines and change 10pt to 12pt or even 14pt.
icon5.gif   Selective emails, posted by David Egolf on Sat Apr 9 06:07:42 2005 
I have a question about sending emails. I have a customer service ELog 
currently running but I would like to have an option to be able to pick 
from a list of people, one or more than one to send emails to with the 
logbook entry as the body.  I am currently using the email option to send 
emails to a list if an emergency is used in a category but I would like to 
be able to send the entry to different people at different times.  I would 
have everyone pre-entered with their names and emails and you could check 
a box by the person or people you want the log entry sent.  I wasn't sure 
if this is possible with the current system. 

Thanks for any input.

David Egolf

PS. The emails are actually email enabled cell phones so the cs entries 
are going to drivers who pick up and drop off work for the company. 
    icon2.gif   Re: Selective emails, posted by Stefan Ritt on Sat Apr 9 10:24:37 2005 
> I have a question about sending emails. I have a customer service ELog 
> currently running but I would like to have an option to be able to pick 
> from a list of people, one or more than one to send emails to with the 
> logbook entry as the body.  I am currently using the email option to send 
> emails to a list if an emergency is used in a category but I would like to 
> be able to send the entry to different people at different times.  I would 
> have everyone pre-entered with their names and emails and you could check 
> a box by the person or people you want the log entry sent.  I wasn't sure 
> if this is possible with the current system. 

It is. Put an MOptions in you config file, and then put individual email
statements there. Like

Attributes = ..., Notify
MOptions Notify = Joe, Jack, Jim
Email Notify Joe = joe@fujicolor.com
Email Notify Jack = jack@fujicolor.com
Email Notify Jim = jim@fujicolor.com

What this does it give you a checkbox for each name. If the check box is
checked, then the corresponding email statement is executed. Note that the
email address does not have to correspond to the "Notify" value. You could also
use completely different names, like "MOptions Notify = Security, Police,
Admin", and then put some email address from specific people there.
icon3.gif   Howto subscribe to ELOG RSS feeds in Mozilla Thunderbird, posted by Stefan Ritt on Fri Apr 8 14:35:19 2005 rss.gif
So subscribe to ELOG RSS feeds, do the following:

- In Thunderbird, click "Tools/Account setting", then click "Add account",
"RSS News & Blogs", "Next", "Finish", "Ok".

- Select "News & Blogs" in the "Folders" pane, right-click and select
"Properties"

- Click on "Manage Subscriptions..."

- Click on "Add"

- Enter the Feed URL of elog. Use your logbook URL and add "elog.rdf". For
this forum for example, enter

http://midas.psi.ch/elogs/Forum/elog.rdf

- Click OK. That's all.

See how the RSS feed shows up in the attached image. Please note that you
need public read access to your logbook for this to work (via "Guest menu
commands"), since the RSS mechanism does not support authentication.
icon5.gif   HTML-File as attachement, posted by Becher on Tue Apr 5 22:39:20 2005 
When I upload a HTML-File as attachement the file is shown as the
HTML-source and not as the formatted text. Is there a possibility to see the
HTML-attachements as formatted text like images are shown as images?
    icon2.gif   Re: HTML-File as attachement, posted by Stefan Ritt on Tue Apr 5 22:45:22 2005 
> When I upload a HTML-File as attachement the file is shown as the
> HTML-source and not as the formatted text. Is there a possibility to see the
> HTML-attachements as formatted text like images are shown as images?

I could turn the ASCII display off, but the result is not always what you want.
If you have a HTML file without the <html>, <header> and <body> tags, it's ok.
But if you have these tags in your HTML (and this is the normal case), the
resulting page has these tags twice, once from the ELOG page and once from the
attachment. This confuses some browsers, so the resulting page might look
strange. A solution would be to strip these tags from the attachment, but for
that I would have to interprete the HTML attachment completely, which is too
much work.

So I will turn the ASCII display off in the next release, but be prepared to see
some nonexpected results.
       icon2.gif   Re: HTML-File as attachement, posted by Becher on Wed Apr 6 14:45:22 2005 
Yesterday I mad a little experiment:
I copied in OpenOffice the content from my HTML file, which was not shown correctly
in ELOG, to a new HTML file, uploaded it in ELOG, and now my file was shown
correctly formatted. The only one problem is that not all lines are shown, in the
last line is written ...1753 more lines... . How can I show all lines? Do I have to
recompile ELOG?
          icon2.gif   Re: HTML-File as attachement, posted by Stefan Ritt on Wed Apr 6 14:56:09 2005 
> Yesterday I mad a little experiment:
> I copied in OpenOffice the content from my HTML file, which was not shown correctly
> in ELOG, to a new HTML file, uploaded it in ELOG, and now my file was shown
> correctly formatted. The only one problem is that not all lines are shown, in the
> last line is written ...1753 more lines... . How can I show all lines? Do I have to
> recompile ELOG?

The reason for the "...1753 more lines..." is the following: Sometimes people upload
really huge files (10 MB or so). If they are displayed as ASCII attachments, each time
you access the entry you have to DOWNLOAD 10 MB. Sometimes even the browser crashes.
That's why I limited the display of the ASCII attachments to the first 1000 lines. To
see the complete file, just lick on the attachment name.

Concerning the inline display of HTML documents, I'm currently thinking of checking if
there is an <HTML> or <BODY> statement inside the file. If not, it might be just some
HTML fraction in which case it could be shown. If yes, it cannot be shown inline, but
if you click on it's name a new browser windows is opened containing the full document.
Does that sound reasonable to you?
             icon2.gif   Re: HTML-File as attachement, posted by Stefan Ritt on Wed Apr 6 21:26:19 2005 
Ok, I turned display of HTML attachments completely off in 2.5.8-3. So if one wants to see
it, on has to click on it. Otherwise there is no way to ensure a correct web page, so
people would complain again that the page does not pass the HTML validator if someone
attached an invalid HTML file.
                icon14.gif   Re: HTML-File as attachement, posted by Becher on Wed Apr 6 23:02:47 2005 
I think this is reasonable. All the HTML-files which I want insert (created with the software
INCA) are not shown correctly. My testfiles made with OpenOffice are shown correctly. Maybe
you have the time to program an option for the attachement "Show inside/Show in new window or
tab", so that the user can choose, how his HTML file is shown. Similiar to the option "Submit
as HTML text".
                   icon2.gif   Re: HTML-File as attachement, posted by Stefan Ritt on Thu Apr 7 22:18:04 2005 
> I think this is reasonable. All the HTML-files which I want insert (created with the software
> INCA) are not shown correctly. My testfiles made with OpenOffice are shown correctly. Maybe
> you have the time to program an option for the attachement "Show inside/Show in new window or
> tab", so that the user can choose, how his HTML file is shown. Similiar to the option "Submit
> as HTML text".

I changed it such that all attachment are shown in a separate browser window if clicked. Hope
this satisfies most people. I believe an extra switch in the config file is too much for this
little thing, unless someone absolutely wants back the old behaviour.
icon5.gif   Conditional Attributes/Preset Text, posted by David Brody on Wed Apr 6 01:51:42 2005 elogd.cfg
I upgraded from ver 2.5.5-2 to 2.5.8-2 and found that none of my preset text
worked any longer.  I struggled with it for several hours and then reverted
back to 2.5.5-2 and the preset text worked again.  I have attached my
elgd.cfg file for review.  Thanks in advance for your help...
    icon2.gif   Re: Conditional Attributes/Preset Text, posted by Stefan Ritt on Wed Apr 6 21:15:03 2005 
> I upgraded from ver 2.5.5-2 to 2.5.8-2 and found that none of my preset text
> worked any longer.  I struggled with it for several hours and then reverted
> back to 2.5.5-2 and the preset text worked again.  I have attached my
> elgd.cfg file for review.  Thanks in advance for your help...

Your config file really helped. You found a bug which happens only if one uses
conditions with lowercase letters, so that's why nobody else saw it before. I
fixed it and released V2.5.8-3
       icon14.gif   Re: Conditional Attributes/Preset Text, posted by David Brody on Thu Apr 7 00:51:05 2005 
> > I upgraded from ver 2.5.5-2 to 2.5.8-2 and found that none of my preset text
> > worked any longer.  I struggled with it for several hours and then reverted
> > back to 2.5.5-2 and the preset text worked again.  I have attached my
> > elgd.cfg file for review.  Thanks in advance for your help...
> 
> Your config file really helped. You found a bug which happens only if one uses
> conditions with lowercase letters, so that's why nobody else saw it before. I
> fixed it and released V2.5.8-3

Thanks for the information.

ELOG is terrific!
icon1.gif   Want to change Entry time when using Copy To, posted by Michael Husbyn on Thu Mar 31 16:29:07 2005 
Hello,

Tried to use the copy to version, just to create a new copy of a old case in
the same logbook
(e.g, support logbook, user with an old problem, to copy it to a new entry)

What I want is to have the Entry time to be updated to the time it was
copyed, not the original entry time. Moved To should perhaps retain its
original time?

Somethings that is possible or a new feature that has to be implemented?


Thanks for this great software Stefan!

Best regards
Michael Husbyn
    icon3.gif   Re: Want to change Entry time when using Copy To, posted by Stefan Ritt on Thu Mar 31 16:31:41 2005 
> What I want is to have the Entry time to be updated to the time it was
> copyed, not the original entry time. Moved To should perhaps retain its
> original time?

You can achieve that by using "Edit", and then check "Resubmit as new entry",
then click "Submit".

- Stefan
       icon3.gif   Re: Want to change Entry time when using Copy To, posted by Michael Husbyn on Thu Mar 31 21:42:58 2005 
> > What I want is to have the Entry time to be updated to the time it was
> > copyed, not the original entry time. Moved To should perhaps retain its
> > original time?
> 
> You can achieve that by using "Edit", and then check "Resubmit as new entry",
> then click "Submit".

The idea is good, but it does not work for me. What happens when I do this is
that I get a new ID, but the old ID is deleted.... It disappears from the list,
and if you try to access it manually it says that it is deleted.

Bug then? My config?

Best regards
Michael
          icon2.gif   Re: Want to change Entry time when using Copy To, posted by Stefan Ritt on Thu Mar 31 21:59:21 2005 
> The idea is good, but it does not work for me. What happens when I do this is
> that I get a new ID, but the old ID is deleted.... It disappears from the list,
> and if you try to access it manually it says that it is deleted.

Right, that how it's supposed to be. Same would happen if you move the entry. It's
deleted from the old place and resubmitted as a new entry. Otherwise you would have
your entry twice, and that is certainly not what you want. How come you access it
manually? If you access it through the list, everything should be fine. I even
update the references if there are replies to this entry, so the replies still
point to the right entry.
             icon2.gif   Re: Want to change Entry time when using Copy To, posted by Michael Husbyn on Thu Mar 31 22:06:37 2005 
> > The idea is good, but it does not work for me. What happens when I do this is
> > that I get a new ID, but the old ID is deleted.... It disappears from the list,
> > and if you try to access it manually it says that it is deleted.
> 
> Right, that how it's supposed to be. Same would happen if you move the entry. It's
> deleted from the old place and resubmitted as a new entry. Otherwise you would have
> your entry twice, and that is certainly not what you want. How come you access it
> manually? If you access it through the list, everything should be fine. I even
> update the references if there are replies to this entry, so the replies still
> point to the right entry.

But I want a duplicate entry of the entry.... so that I can reuse the text and other
items and just change the entrys that need to be changed.

E.g, you have a work request from one user with some kind of solution on it, then you
get a similar request from another user and you want to have almost the same
information in a new entry. Then you just want to create a copy of the old case and
change whatever needs to be changed.

I'm not sure if you understand what I tries to do?


Best regards
Michael
                icon2.gif   Re: Want to change Entry time when using Copy To, posted by Stefan Ritt on Thu Mar 31 22:15:34 2005 
> But I want a duplicate entry of the entry.... so that I can reuse the text and other
> items and just change the entrys that need to be changed.
> 
> E.g, you have a work request from one user with some kind of solution on it, then you
> get a similar request from another user and you want to have almost the same
> information in a new entry. Then you just want to create a copy of the old case and
> change whatever needs to be changed.
> 
> I'm not sure if you understand what I tries to do?

Now I understand. What you ask for is not possible right now, but I put it on the
wishlist. The best would be to add a new command "Duplicate" to the menu, which lets you
do exactly what you want.
                   icon2.gif   Re: Want to change Entry time when using Copy To, posted by Michael Husbyn on Thu Mar 31 22:22:40 2005 
> > But I want a duplicate entry of the entry.... so that I can reuse the text and other
> > items and just change the entrys that need to be changed.
> > 
> > E.g, you have a work request from one user with some kind of solution on it, then you
> > get a similar request from another user and you want to have almost the same
> > information in a new entry. Then you just want to create a copy of the old case and
> > change whatever needs to be changed.
> > 
> > I'm not sure if you understand what I tries to do?
> 
> Now I understand. What you ask for is not possible right now, but I put it on the
> wishlist. The best would be to add a new command "Duplicate" to the menu, which lets you
> do exactly what you want.

Thank you!

Or what I understand with "Resubmit as new entry", keep the old and create a new entry.
Perhaps you can trigger behavior of resubmit with a switch?
Duplicate Resubmit = 1
(default to 0 - old behavior)

or your idea is good as well.

Or just update the Entrytime if you are using Copy To:
EntryUpdate Copy To = 1

with also solves my case.

(and switch for Move To as well?)


Have a nice evening,

Best regards
Michael
                      icon2.gif   Re: Want to change Entry time when using Copy To, posted by Stefan Ritt on Thu Mar 31 22:40:43 2005 
> or your idea is good as well.

Ok, I implemented a 'Duplicate' command (see this forum for example). I guess this is clearer
than modifying some of the existing functionality like 'resubmit' or 'copy to'. With 'copy to'
you probably want to keep all information from the original entry, including the submission
time, when you move it from one logbook into an other. So if we put an 'EntryUpdate Copy To',
this would not be possible any more. The new version is under CVS.

- Stefan
                         icon2.gif   Re: Want to change Entry time when using Copy To, posted by Michael Husbyn on Thu Mar 31 22:49:08 2005 
> > or your idea is good as well.
> 
> Ok, I implemented a 'Duplicate' command (see this forum for example). I guess this is clearer
> than modifying some of the existing functionality like 'resubmit' or 'copy to'. With 'copy to'
> you probably want to keep all information from the original entry, including the submission
> time, when you move it from one logbook into an other. So if we put an 'EntryUpdate Copy To',
> this would not be possible any more. The new version is under CVS.


Wow! You are really fast!

I'm going to try it now!

This works for me :)


Thanks for quick response Stefan!


Best regards
Michael
ELOG V3.1.5-2eba886