Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 136 of 238  Not logged in ELOG logo
icon3.gif   Adding texts for each attachment, posted by Dongwook Jang on Mon Mar 16 22:33:23 2009 

Dear Stefan,

First of all, I appreciate that you made such a nice program. I've used elog for more than 5 years and it was wonderful experince to me and my research work was very productive with this.

I have a suggestion to you to improve this while I was using elog. If users can add texts or comments for each attachment, it will be great.

I am not sure if someone was already suggested this or it is already in your wish list.

Thank you.

Dongwook Jang

    icon2.gif   Re: Adding texts for each attachment, posted by Stefan Ritt on Mon Mar 16 22:53:22 2009 elog.png

 

Dongwook Jang wrote:

Dear Stefan,

First of all, I appreciate that you made such a nice program. I've used elog for more than 5 years and it was wonderful experince to me and my research work was very productive with this.

I have a suggestion to you to improve this while I was using elog. If users can add texts or comments for each attachment, it will be great.

I am not sure if someone was already suggested this or it is already in your wish list.

Thank you.

Dongwook Jang

 

Dear Dongwook,

no, this is not implemented and also was never requested. The way most people work is that images are included directly in the text, and the the text goes along with that.

So for example if I want to show you the ELOG logo, I put it here: elog.png 

If I want to add a comment for an attachment, I write it in the text and just refence the attachment with link. This way is more flexible that adding just a line of text to each attachment, since you can write several lines in the text, make a table etc. etc.

       icon2.gif   Re: Adding texts for each attachment, posted by Dongwook Jang on Tue Mar 17 02:05:08 2009 

Stefan Ritt wrote:

 

Dongwook Jang wrote:

Dear Stefan,

First of all, I appreciate that you made such a nice program. I've used elog for more than 5 years and it was wonderful experince to me and my research work was very productive with this.

I have a suggestion to you to improve this while I was using elog. If users can add texts or comments for each attachment, it will be great.

I am not sure if someone was already suggested this or it is already in your wish list.

Thank you.

Dongwook Jang

 

Dear Dongwook,

no, this is not implemented and also was never requested. The way most people work is that images are included directly in the text, and the the text goes along with that.

So for example if I want to show you the ELOG logo, I put it here: elog.png 

If I want to add a comment for an attachment, I write it in the text and just refence the attachment with link. This way is more flexible that adding just a line of text to each attachment, since you can write several lines in the text, make a table etc. etc.

 

 

Dear Stefan,

Maybe I used elog with very inefficient way so far. The way you suggested requires putting figures somewhere else, right?

Elog saves attachments on the machine that elog is running. I want to store figures in elog.

The logo you showed above is stored in this entry?

Thank you.

Dongwook Jang

          icon2.gif   Re: Adding texts for each attachment, posted by Stefan Ritt on Wed Mar 18 04:23:41 2009 
Dongwook Jang wrote:

Dear Stefan,

Maybe I used elog with very inefficient way so far. The way you suggested requires putting figures somewhere else, right?

Elog saves attachments on the machine that elog is running. I want to store figures in elog.

The logo you showed above is stored in this entry?

Thank you.

Dongwook Jang

If you embed an image (via the "insert image" button in the task bar) this image is stored as an attachment, but the actualy attachment is hidden and the image is shown in-line. Yes, it is stored on the server where elogd runs. 

 

icon5.gif   How ca I delete / hide the Elog Icon and Labels like ELOG V2.7.5-2175, posted by Heinzmann on Wed Mar 11 15:51:36 2009 

Hi Stephan,

How can I delete / hide the Elog Icon ELOG logo

and Labels like ELOG V2.7.5-2175 ?

Thanks,

Michael

 

    icon2.gif   Re: How ca I delete / hide the Elog Icon and Labels like ELOG V2.7.5-2175, posted by Heinzmann on Thu Mar 12 21:21:00 2009 

Heinzmann wrote:

Hi Stephan,

How can I delete / hide the Elog Icon ELOG logo

and Labels like ELOG V2.7.5-2175 ?

Thanks,

Michael

 

 Sorry,

found it:

 

Bottom text = <center>Hello</center>
Bottom text login = <center>Login Hello</center>

icon4.gif   Odd behaviour with gecko based browsers and reverse proxy., posted by Andraž 'ruskie' Levstik on Thu Mar 12 08:03:07 2009 
I have a really odd issue with elog...

My setup:

elogd.cfg:
[global]
port = 2109
SMTP host = localhost
Resource dir = /usr/share/elog
Logbook dir = /srv/www/elog
charset = UTF-8
Main Tab = main
URL = https://elog.codemages.net
Relative redirection = 1
Usr = www
Grp = www
Resolve host names = 0
Self register = 0 
Admin user = ruskie
SSL = 0
Login expiration = 20

[links]
Subdir = links
Theme = default
Comment = Link spam
Attributes = Author, Category, Link, Comment
Options Category = General, Law, IT, Odds, Linux
Required Attributes = Link, Comment
Page Title = ELOG - Link spam
Reverse sort = 1
Quick filter = Date, Category
Time format = %Y-%m-%dT%H:%M
Date format = %Y-%m-%d
Password file = links.pwd
Admin user = ruskie
RSS Title = $logbook $entry time :$Author :$Link :$Comment

[notes]
Subdir = notes
Theme = default
Comment = Various notes
Attributes = Category, Comment
Options Category = General, Law, IT, Odds, Linux
Required Attributes = Comment
Page Title = ELOG - Various notes
Reverse sort = 1
Quick filter = Date, Category
Time format = %Y-%m-%dT%H:%M
Date format = %Y-%m-%d
Password file = notes.pwd
Admin user = ruskie
RSS Title = $logbook $entry time :$Comment


lighttpd.conf:
$HTTP["host"] =~ "elog.*" {
  proxy.server = ( "" =>
                   ( "10.0.0.10" =>
                     (
                       "host" => "10.0.0.10",
                       "port" => 2109
                     )
                   )
                 )

}

If I access elog directly on 2109 I get no issues but when I use this configuration it takes minutes to access
any elog page at all. But the odd thing is this only happens when I'm using a gecko based browser(firefox,
xulrunner based etc...) if I use webkit-gtk or elinks all the pages load up with no noticable delay.

I have tried this on different computers, different configurations and so on... And always the same behaviour
when it comes to a gecko based browser. Elinks and webkit-gtk load up fine.

Marking this as Other so far. If anyone knows anything about running elog and lighttpd togheter please speak up.
icon5.gif   Elogd crash, posted by Dominique Bolla on Wed Mar 11 11:28:27 2009 

Hello,

Please could you help me.

We have 2 elog servers synchronized every minute via Elog mirroring function.

2 or 3 times a week, the slave crashes and we have to restart Elogd. I have found in /var/log/messages the same message every time elogd crash :

xmalloc: not enough memory

Thanks.

Dominique Bolla.

icon3.gif   Email recall function similar to what exists say in something like Outlook, posted by Niall Dooley on Fri Mar 6 13:49:19 2009 

Hi,

Is there a way perhaps of implementing an email recall feature into E-Log? In other words, to recall an email before the recipient (s) read the email originating from the e-log. Something perhaps along the lines of what exists in something like Outlook.

Thks in advance.

Regards,

Niall

    icon2.gif   Re: Email recall function similar to what exists say in something like Outlook, posted by Stefan Ritt on Mon Mar 9 19:00:26 2009 

Niall Dooley wrote:

Hi,

Is there a way perhaps of implementing an email recall feature into E-Log? In other words, to recall an email before the recipient (s) read the email originating from the e-log. Something perhaps along the lines of what exists in something like Outlook.

Thks in advance.

Regards,

Niall

No, this is not implemented. What I usually do is to check "Suppress Email notification", submit and revise my entry. Once I'm satisfied, I edit again and do not check "Suppress Email notification" so that the email is finally sent out.

icon5.gif   Login issue , posted by Heinzmann on Thu Mar 5 23:20:13 2009 

Hello,

I have installed the latest elog version from your web site.

My Admin user and my Login user are set in the elog.cfg to use the Self register process within the first login.

The issue is that I get only one time access to my log on the server (XP) and that is direct after the Selfregister process.

If I log out and login to test my admin and user account I will not get access to my server anymore.

My login page stays without any error message.

1 Notebook  XP Client internet explorer http://host ip:8080/demo------> 2nd Notebook XP Server

I have the deleted the cookies after each try.

I have retested later the accounts several times (login/logout) successful with the internet explorer http://host ip:8080/ on the server itself.

 Please could you help me to identify the issue?

 

 

 

 

 

 

    icon2.gif   Re: Login issue , posted by Heinzmann on Mon Mar 9 14:50:03 2009 

Heinzmann wrote:

Hi,

I have found the issue, when I mark at the login page:

Keep me logged in on this computer
for the next 41 days or until I log out

 

I'm not able to login. Only when it is not marked I'm able to login.

How can I diable/hide the part (Keep me logged in on this computer
for the next 41 days or until I log out) from my login page?

 

 

 

 

 

 

       icon6.gif   Re: Login issue , posted by Heinzmann on Mon Mar 9 17:32:54 2009 

Heinzmann wrote:

Heinzmann wrote:

Hi,

I have found the issue, when I mark at the login page:

Keep me logged in on this computer
for the next 41 days or until I log out

 

I'm not able to login. Only when it is not marked I'm able to login.

How can I diable/hide the part (Keep me logged in on this computer
for the next 41 days or until I log out) from my login page?I

Issue solved: Login expiration = 0

 

 

 

 

 

 

          icon2.gif   Re: Login issue , posted by Stefan Ritt on Mon Mar 9 18:58:18 2009 

Heinzmann wrote:

Heinzmann wrote:

Heinzmann wrote:

Hi,

I have found the issue, when I mark at the login page:

Keep me logged in on this computer
for the next 41 days or until I log out

 

I'm not able to login. Only when it is not marked I'm able to login.

How can I diable/hide the part (Keep me logged in on this computer
for the next 41 days or until I log out) from my login page?I

Issue solved: Login expiration = 0

Great, you found it! The original problem is probably related to your cookie handling. If you don't check the "keep me logged it" box, elog generates a temporary cookie, which is used for the duration of your browser session, then the browser discards it. If you theck the box, a persistent cookie is created, which your browser stores in the cookie database and reuses it for the coming 41 days. I believe you have a problem there (persistent cookies not allowed, disk full, whatever...) which does not allow handling of persistent cookies. Try from anohter browser/computer and you will see that it works.

icon5.gif   Email authentication with SSL/TLS, posted by Val Schmidt on Wed Mar 4 22:47:46 2009 

Hi,

I'm curious is it possible to send email notificaitons from elog through an smtp server that requires SSL/TLS authentication? I think it's not but I thought I'd ask.

 

-Val

 

ps. sorry for the initial blank post...

    icon2.gif   Re: Email authentication with SSL/TLS, posted by Stefan Ritt on Fri Mar 6 21:51:48 2009 

 

Val Schmidt wrote:

Hi,

I'm curious is it possible to send email notificaitons from elog through an smtp server that requires SSL/TLS authentication? I think it's not but I thought I'd ask.

 

-Val

This is currently not implemented and will probably not implemented in the next time, but it's on my (very long) to-do list.

icon4.gif   Elogd crashes with: *** stack smashing detected ***, posted by Niklas on Fri Nov 21 10:53:09 2008 

Hi,

 

elogd sometimes crashes when there are large cookies. Or I'd guess it has something to do with the cookies, elogd crashed over and over again until I cleaned out cookies and authenticated sessions in firefox, then it stopped.

 

When I run "elogd -v" in gdb, and someone does:

 



GET / HTTP/1.1
Host: bba.eld.ki.sw.home.se:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; sv-SE; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: urem=0; TWIKISID=ecaa5a39e8446a27ec5a34bcbb9d4bcb; unm=erirone; upwd=c3w5MTg1; ipplanNoAuth=yes; SMSESSION=oKvAAv/J9WoCo6KoVdEJkhxz44G10x7TXigffOaAjLrSf0iOFrRJq97oWl32/UBQMvFslc4BgxN/VCz2K7/IRaKdFgmU4CHq/1UUv2RvdHB2HUbYbph+JgKUpAG+kN6Cc4BTwRWhmemUNhONXMRJUCfa6Tq9/osID2AT1wBFInFNww2xVmJPDSi1oltxtT345RgdGQIZbHzG2HBi1GijpiaD+4FI3WLLRzJOj3Art92BLlVDWSaPxKSdSZgVNfRSw33SupUqwD0Is2pc+ufKn4cg0azyOTLNDFOl0U5RI7K9AVgYM0NBsfDoEyBfK8pYIZTMqFFQsnWAdwYz9M2RLDBKyfMXdfGb3rrnOdPH0zvvkkoT01pZObI7dSqHD7IXLbjN/8Pt0O4eo5/SSQ7uKRGpBip0pKe3mxZYI4hsJejYwVBFegovS4qSUiL8UGDhG+lB20WEmDwIQfTG2ZtpckLC6t1CNfa5eFLWCOm+yESU+3AmP4zdJLJSqbznEl2SQTePP5NzI1R5WTAvBbsgX+N9Ab1g0Yui/i042qWNQPLg3/5c/WCHqzImi45+ov42C4mj9OcjGcAf7kaWBMwfdwfChREWkSpMrC2RRndlw+iVbShSK7lVfoCvIqk4491uQBT3bz3S0e56Vin+Oj8qbmEA/5Hp1x9b80qTRy/8lj7KLgbhV60BBvX7ahOkrIFCSjTi8y87K/u4b3KQHesNZgA7SyWRuT+vY4XCb8ANVl8eIui7vK5NNSiFFqLZ1IoeFaVu+gS/hhDu3m/rmK2t5iR2YW/aKmnGTVQsPPy/POVY/zXWgf7c6ps/sSMwTk9sy5Yr8yGYBSUrtZkn1/gK0wpqlRCcjuG991sfgr/UKbhK1dU0rI9E9PBPhvLQpjUHT49AAHL9A9S3FOs66CAFsoVo00WNqKuZcmLpEgXdpbW+mj43tiNugCT98Ec8+Iq0rZYKhYdqFu9AUOdJVXk2udBx9VkOVcRYteFICtwz3fvR02KCU3Sn3a0HKZ4wWOujUnH4nThZGVlUNyg/Of+9GKXY4mxqv/5ocEkO4q8xmAP/OJHrvgJ42kTAjaVgjlSG3b5iJTcu4jvqfC/yKU88Sw==


*** stack smashing detected ***: /root/elogd_2.7.5_2142 terminated
 


 

 


*** stack smashing detected ***: /root/elogd_2.7.5_2142 terminated

Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7dad875 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7daf201 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7de4e5c in ?? () from /lib/tls/i686/cmov/libc.so.6
#4  0x00000000 in ?? ()
(gdb)

 

 

 

 

    icon2.gif   Re: Elogd crashes with: *** stack smashing detected ***, posted by Niklas on Fri Nov 21 16:02:10 2008 

Niklas wrote:

Hi,

 

elogd sometimes crashes when there are large cookies. Or I'd guess it has something to do with the cookies, elogd crashed over and over again until I cleaned out cookies and authenticated sessions in firefox, then it stopped.

 

When I run "elogd -v" in gdb, and someone does:

 



GET / HTTP/1.1
Host: bba.eld.ki.sw.home.se:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; sv-SE; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: urem=0; TWIKISID=ecaa5a39e8446a27ec5a34bcbb9d4bcb; unm=erirone; upwd=c3w5MTg1; ipplanNoAuth=yes; SMSESSION=oKvAAv/J9WoCo6KoVdEJkhxz44G10x7TXigffOaAjLrSf0iOFrRJq97oWl32/UBQMvFslc4BgxN/VCz2K7/IRaKdFgmU4CHq/1UUv2RvdHB2HUbYbph+JgKUpAG+kN6Cc4BTwRWhmemUNhONXMRJUCfa6Tq9/osID2AT1wBFInFNww2xVmJPDSi1oltxtT345RgdGQIZbHzG2HBi1GijpiaD+4FI3WLLRzJOj3Art92BLlVDWSaPxKSdSZgVNfRSw33SupUqwD0Is2pc+ufKn4cg0azyOTLNDFOl0U5RI7K9AVgYM0NBsfDoEyBfK8pYIZTMqFFQsnWAdwYz9M2RLDBKyfMXdfGb3rrnOdPH0zvvkkoT01pZObI7dSqHD7IXLbjN/8Pt0O4eo5/SSQ7uKRGpBip0pKe3mxZYI4hsJejYwVBFegovS4qSUiL8UGDhG+lB20WEmDwIQfTG2ZtpckLC6t1CNfa5eFLWCOm+yESU+3AmP4zdJLJSqbznEl2SQTePP5NzI1R5WTAvBbsgX+N9Ab1g0Yui/i042qWNQPLg3/5c/WCHqzImi45+ov42C4mj9OcjGcAf7kaWBMwfdwfChREWkSpMrC2RRndlw+iVbShSK7lVfoCvIqk4491uQBT3bz3S0e56Vin+Oj8qbmEA/5Hp1x9b80qTRy/8lj7KLgbhV60BBvX7ahOkrIFCSjTi8y87K/u4b3KQHesNZgA7SyWRuT+vY4XCb8ANVl8eIui7vK5NNSiFFqLZ1IoeFaVu+gS/hhDu3m/rmK2t5iR2YW/aKmnGTVQsPPy/POVY/zXWgf7c6ps/sSMwTk9sy5Yr8yGYBSUrtZkn1/gK0wpqlRCcjuG991sfgr/UKbhK1dU0rI9E9PBPhvLQpjUHT49AAHL9A9S3FOs66CAFsoVo00WNqKuZcmLpEgXdpbW+mj43tiNugCT98Ec8+Iq0rZYKhYdqFu9AUOdJVXk2udBx9VkOVcRYteFICtwz3fvR02KCU3Sn3a0HKZ4wWOujUnH4nThZGVlUNyg/Of+9GKXY4mxqv/5ocEkO4q8xmAP/OJHrvgJ42kTAjaVgjlSG3b5iJTcu4jvqfC/yKU88Sw==


*** stack smashing detected ***: /root/elogd_2.7.5_2142 terminated
 


 

 


*** stack smashing detected ***: /root/elogd_2.7.5_2142 terminated

Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7dad875 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7daf201 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7de4e5c in ?? () from /lib/tls/i686/cmov/libc.so.6
#4  0x00000000 in ?? ()
(gdb)

 

 

 

 

 Stefan,

perhaps there should be something like the bold text below in elogd.c:

int process_http_request(const char *request, int i_conn)^M
...

   /* extract cookies */^M
   if ((p = strstr(request, "Cookie:")) != NULL) {^M
      p += 6;^M
      do {^M
         p++;^M
         while (*p && *p == ' ')^M
            p++;^M
         strlcpy(str, p, sizeof(str));^M
         for (i = 0; i < (int) strlen(str); i++)^M
            if (str[i] == '=' || str[i] == ';')^M
               break;^M
         if (str[i] == '=') {^M
            str[i] = 0;^M
            p += i + 1;^M
            for (i = 0; *p && *p != ';' && *p != '\r' && *p != '\n' && i < (int) sizeof(cookie); i++)
                      cookie[i] = *p++;

...

       icon2.gif   Re: Elogd crashes with: *** stack smashing detected ***, posted by Stefan Ritt on Mon Nov 24 18:15:01 2008 

 

Niklas wrote:

 

Stefan,

perhaps there should be something like the bold text below in elogd.c:

int process_http_request(const char *request, int i_conn)^M
...

   /* extract cookies */^M
   if ((p = strstr(request, "Cookie:")) != NULL) {^M
      p += 6;^M
      do {^M
         p++;^M
         while (*p && *p == ' ')^M
            p++;^M
         strlcpy(str, p, sizeof(str));^M
         for (i = 0; i < (int) strlen(str); i++)^M
            if (str[i] == '=' || str[i] == ';')^M
               break;^M
         if (str[i] == '=') {^M
            str[i] = 0;^M
            p += i + 1;^M
            for (i = 0; *p && *p != ';' && *p != '\r' && *p != '\n' && i < (int) sizeof(cookie); i++)
                      cookie[i] = *p++;

...

 

Wow, where did you get that long cookie from? Certainly not from elogd. You must run elogd under Apache, and have some other service next to it on your server which distributes this long cookies, that's why other people did not experience this problem yet. I appreciate your fix. It's alwasy nice to see users not only complain about things, but try to fix them. Your fix is almost correct, you need a

i<(int) sizeof(cookie)-1

since there is the trailing zero for terminating the cookie string. I applied your fix to SVN revision #2146.

          icon2.gif   Re: Elogd crashes with: *** stack smashing detected ***, posted by Niklas on Thu Nov 27 10:29:19 2008 

Stefan Ritt wrote:

 

Niklas wrote:

 

Stefan,

perhaps there should be something like the bold text below in elogd.c:

int process_http_request(const char *request, int i_conn)^M
...

   /* extract cookies */^M
   if ((p = strstr(request, "Cookie:")) != NULL) {^M
      p += 6;^M
      do {^M
         p++;^M
         while (*p && *p == ' ')^M
            p++;^M
         strlcpy(str, p, sizeof(str));^M
         for (i = 0; i < (int) strlen(str); i++)^M
            if (str[i] == '=' || str[i] == ';')^M
               break;^M
         if (str[i] == '=') {^M
            str[i] = 0;^M
            p += i + 1;^M
            for (i = 0; *p && *p != ';' && *p != '\r' && *p != '\n' && i < (int) sizeof(cookie); i++)
                      cookie[i] = *p++;

...

 

Wow, where did you get that long cookie from? Certainly not from elogd. You must run elogd under Apache, and have some other service next to it on your server which distributes this long cookies, that's why other people did not experience this problem yet. I appreciate your fix. It's alwasy nice to see users not only complain about things, but try to fix them. Your fix is almost correct, you need a

i<(int) sizeof(cookie)-1

since there is the trailing zero for terminating the cookie string. I applied your fix to SVN revision #2146.

I the cookie is used for single-sign-on for multiple sites within company.com. So the cookie is issued for "company.com" i.e. all websites gets it even elog.company.com:8080..

I mostly fibble little bit in perl (dont need to bother with trailing zeros there ).

BR, Niklas

 

 

          icon2.gif   Re: Elogd crashes with: *** stack smashing detected ***, posted by Niklas on Fri Jan 9 10:41:20 2009 

Stefan Ritt wrote:

 

Niklas wrote:

 

Stefan,

perhaps there should be something like the bold text below in elogd.c:

int process_http_request(const char *request, int i_conn)^M
...

   /* extract cookies */^M
   if ((p = strstr(request, "Cookie:")) != NULL) {^M
      p += 6;^M
      do {^M
         p++;^M
         while (*p && *p == ' ')^M
            p++;^M
         strlcpy(str, p, sizeof(str));^M
         for (i = 0; i < (int) strlen(str); i++)^M
            if (str[i] == '=' || str[i] == ';')^M
               break;^M
         if (str[i] == '=') {^M
            str[i] = 0;^M
            p += i + 1;^M
            for (i = 0; *p && *p != ';' && *p != '\r' && *p != '\n' && i < (int) sizeof(cookie); i++)
                      cookie[i] = *p++;

...

 

Wow, where did you get that long cookie from? Certainly not from elogd. You must run elogd under Apache, and have some other service next to it on your server which distributes this long cookies, that's why other people did not experience this problem yet. I appreciate your fix. It's alwasy nice to see users not only complain about things, but try to fix them. Your fix is almost correct, you need a

i<(int) sizeof(cookie)-1

since there is the trailing zero for terminating the cookie string. I applied your fix to SVN revision #2146.

 Just noticed that this fix does not work. Elog cookies e.g. "upwd" may be after other long cookies its not seen, as now it stops reading the cookie-string after 256 chars. There needs to be something that goes through the cookies and saves only elog cookies... Would probably be better if you code that, if you have time  =D

 

BR, niklas

             icon2.gif   Re: Elogd crashes with: *** stack smashing detected ***, posted by Niklas on Tue Jan 13 14:30:37 2009 

 

Stefan,

To solve the problem I suggest following change to elogd.c (2.7.5 2159).

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

---
$ diff elog/src/elogd.c elogd_niho.c
26557a26558
>    const char *cookie_list[] = { "upwd", "unm", "elmode", "urem", "wpwd", "apwd", "uname", NULL };
26603c26604,26610
<          setparam(str, cookie);
---
>          for(i=0; cookie_list[i]; i++) {
>             if(strcmp(cookie_list[i], str) == 0) {
>                setparam(str, cookie);
>                break;
>             }
>          }
>
---

In a more readable fashion:
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;
            }
         }

...

 

Not sure if I got all the cookies used by elog.

 

BR, niklas

                icon2.gif   Re: Elogd crashes with: *** stack smashing detected ***, posted by Stefan Ritt on Wed Jan 21 08:45:25 2009 

 

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.

                   icon2.gif   Re: Elogd crashes with: *** stack smashing detected ***, posted by Niklas on Wed Mar 4 16:32:56 2009 

Stefan Ritt wrote:

 

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.

Tried 2178 and I seem to hit some endless loop when I have big cookies. The loop seems to be in this for-loop (from gdb).

I perhaps you should have:

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

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

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

   else
      break;

   cookie[i] = 0;

... Seems to be working for me =)

 

                      icon2.gif   Re: Elogd crashes with: *** stack smashing detected ***, posted by Stefan Ritt on Wed Mar 4 16:41:27 2009 
Niklas wrote:

Tried 2178 and I seem to hit some endless loop when I have big cookies. The loop seems to be in this for-loop (from gdb).

I perhaps you should have:

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

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

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

   else
      break;

   cookie[i] = 0;

... Seems to be working for me =)

Yepp, you're right. I applied your change to the distribution code. 

 

ELOG V3.1.5-3fb85fa6