ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
66663
|
Fri Jan 8 18:26:56 2010 |
| Aaron Couture | acouture@lanl.gov | Bug report | Linux | rev2280 | Re: Problem with CRYPT+SSL and elog command line entries |
Aaron Couture wrote: |
I Aaron Couture wrote: |
There was some sloppiness in the original patch--__USE_XOPEN wasn't defined, but worked when elog wasn't compiled alone. Now the appropriate ifndef/define statements are in elog.c
I have attached a possible patch--basically pirated from elogd.c Because strlcpy needed for the crypt cares about size, do_crypt needed the size, which had not been a concern for base64_encode in elog.c As a result, base64_encode changed slightly as well. I think the implementation places a limit of 32 characters on passwords, which seemed to already be the limit in elogd.c The elog.c limit appeared to be 80 characters. I tested both SSL and SSL+CRYPT for commandline elog entries with both a logbook specific write password as well as username/password combo in a password file.
AJC
I am in the process of setting up a new ELOG logbook. I checked out rev2280 from svn.savannah.psi.ch. I knew I wanted to encrypt passwords, so when I compiled, I used flags
USE_SSL=1
and
USE_CRYPT=1
I am running Red Hat enterprise linux 3, glibc-devel-2.3.2-95.50, openssl-devel-0.9.7a-33.25
Everything seemed to be working fine--I was able to set up logbooks using both a password file as well as write passwords and make entries to the logs. Then I tried to use the command line 'elog' to make an entry which failed to both logbooks.
/opt/elog/pro/elogd -c /opt/elog/pro/dansce_fancy.cfg -l Demo1 -w <mypassword>
Would change the password in dansce_fancy.cfg and I could make entries through the web interface, but
elog -h acouture -s -p 8081 -w <mypassword> -l Demo1 -a Author="Aaron Couture" -a Type=Routine -m Sampleinfo.txt -x -n 1
failed with
Error: Invalid user name or password
I got the same behaviour when I used a logbook with a user/password pair defined in a password file.
When I looked at the output from running elogd with the -v flag, I could see that everything was being received on the server side, but that the password did not agree with the write password in dansce_fancy.cfg
I then recompiled elog with
USE_SSL=1
USE_CRYPT=
And then the elog command line entries worked, both with write passwords and a password file (after recreating the password file and the write password). Looking at the elog.c source code, it appears that it does not know to use crypt rather then base64_encode when USE_CRYPT is true. elogd.c defined different behaviour if USE_CRYPT is defined.
Thanks,
Aaron Couture
|
|
|
Attachment 1: elogc.patch
|
26a27,30
> #ifndef __USE_XOPEN
> #define __USE_XOPEN /* needed for crypt() */
> #endif
>
64c68
< void base64_encode(char *s, char *d)
---
> void base64_encode(unsigned char *s, unsigned char *d, int size)
66a71
> unsigned char *p;
68c73
< pad = 3 - strlen(s) % 3;
---
> pad = 3 - strlen((char *) s) % 3;
70a76
> p = d;
86a93,94
> if (d - p >= size - 3)
> return;
92a101
>
182a192,201
>
> void do_crypt(char *s, char *d, int size)
> {
> #ifdef HAVE_CRYPT
> strlcpy(d, crypt(s, "el"), size);
> #else
> base64_encode((unsigned char *) s, (unsigned char *) d, size);
> #endif
> }
>
382c401
< char str[256], *ph, *ps;
---
> char str[256], encrypted_passwd[32], *ph, *ps;
422,423c441,442
< base64_encode(passwd, str);
< sprintf(request + strlen(request), "wpwd=%s;", str);
---
> do_crypt(passwd, encrypted_passwd, sizeof(encrypted_passwd) );
> sprintf(request + strlen(request), "wpwd=%s;", encrypted_passwd);
439,440c458,459
< base64_encode(upwd, str);
< sprintf(request + strlen(request), "upwd=%s;", str);
---
> do_crypt(upwd, encrypted_passwd, sizeof(encrypted_passwd) );
> sprintf(request + strlen(request), "upwd=%s;", encrypted_passwd);
628c647
< char host_name[256], boundary[80], str[80], *p, *old_encoding;
---
> char host_name[256], boundary[80], str[80], encrypted_passwd[32], *p, *old_encoding;
801c820
< base64_encode(upwd, str);
---
> do_crypt(upwd, encrypted_passwd, sizeof(encrypted_passwd) );
803c822
< "%s\r\nContent-Disposition: form-data; name=\"upwd\"\r\n\r\n%s\r\n", boundary, str);
---
> "%s\r\nContent-Disposition: form-data; name=\"upwd\"\r\n\r\n%s\r\n", boundary, encrypted_passwd);
885,886c904,905
< base64_encode(passwd, str);
< sprintf(request + strlen(request), "Cookie: wpwd=%s\r\n", str);
---
> do_crypt(passwd, encrypted_passwd, sizeof(encrypted_passwd) );
> sprintf(request + strlen(request), "Cookie: wpwd=%s\r\n", encrypted_passwd);
|
66662
|
Thu Jan 7 21:41:43 2010 |
| Erik Iverson | eiverson@ornl.gov | Question | All | 2.7.8 | Any way to paste clipboard into entry? | Is there any way to directly paste an image from a Windows clipboard into an elog entry page? It's obvious
for uploading a file, but many of my users say that they never make a file, they just want to paste in an image
already onscreen. |
66661
|
Thu Jan 7 21:22:09 2010 |
| Aaron Couture | acouture@lanl.gov | Bug report | Linux | rev2280 | Re: Problem with CRYPT+SSL and elog command line entries |
I Aaron Couture wrote: |
I have attached a possible patch--basically pirated from elogd.c Because strlcpy needed for the crypt cares about size, do_crypt needed the size, which had not been a concern for base64_encode in elog.c As a result, base64_encode changed slightly as well. I think the implementation places a limit of 32 characters on passwords, which seemed to already be the limit in elogd.c The elog.c limit appeared to be 80 characters. I tested both SSL and SSL+CRYPT for commandline elog entries with both a logbook specific write password as well as username/password combo in a password file.
AJC
I am in the process of setting up a new ELOG logbook. I checked out rev2280 from svn.savannah.psi.ch. I knew I wanted to encrypt passwords, so when I compiled, I used flags
USE_SSL=1
and
USE_CRYPT=1
I am running Red Hat enterprise linux 3, glibc-devel-2.3.2-95.50, openssl-devel-0.9.7a-33.25
Everything seemed to be working fine--I was able to set up logbooks using both a password file as well as write passwords and make entries to the logs. Then I tried to use the command line 'elog' to make an entry which failed to both logbooks.
/opt/elog/pro/elogd -c /opt/elog/pro/dansce_fancy.cfg -l Demo1 -w <mypassword>
Would change the password in dansce_fancy.cfg and I could make entries through the web interface, but
elog -h acouture -s -p 8081 -w <mypassword> -l Demo1 -a Author="Aaron Couture" -a Type=Routine -m Sampleinfo.txt -x -n 1
failed with
Error: Invalid user name or password
I got the same behaviour when I used a logbook with a user/password pair defined in a password file.
When I looked at the output from running elogd with the -v flag, I could see that everything was being received on the server side, but that the password did not agree with the write password in dansce_fancy.cfg
I then recompiled elog with
USE_SSL=1
USE_CRYPT=
And then the elog command line entries worked, both with write passwords and a password file (after recreating the password file and the write password). Looking at the elog.c source code, it appears that it does not know to use crypt rather then base64_encode when USE_CRYPT is true. elogd.c defined different behaviour if USE_CRYPT is defined.
Thanks,
Aaron Couture
|
|
Attachment 1: elogc.patch
|
64c64
< void base64_encode(char *s, char *d)
---
> void base64_encode(unsigned char *s, unsigned char *d, int size)
66a67
> unsigned char *p;
68c69
< pad = 3 - strlen(s) % 3;
---
> pad = 3 - strlen((char *) s) % 3;
70a72
> p = d;
86a89,90
> if (d - p >= size - 3)
> return;
92a97,106
> void do_crypt(char *s, char *d, int size)
> {
> #ifdef HAVE_CRYPT
> strlcpy(d, crypt(s, "el"), size);
> #else
> base64_encode((unsigned char *) s, (unsigned char *) d, size);
> #endif
> }
>
>
382c396
< char str[256], *ph, *ps;
---
> char str[256], encrypted_passwd[32], *ph, *ps;
422,423c436,437
< base64_encode(passwd, str);
< sprintf(request + strlen(request), "wpwd=%s;", str);
---
> do_crypt(passwd, encrypted_passwd, sizeof(encrypted_passwd) );
> sprintf(request + strlen(request), "wpwd=%s;", encrypted_passwd);
439,440c453,454
< base64_encode(upwd, str);
< sprintf(request + strlen(request), "upwd=%s;", str);
---
> do_crypt(upwd, encrypted_passwd, sizeof(encrypted_passwd) );
> sprintf(request + strlen(request), "upwd=%s;", encrypted_passwd);
628c642
< char host_name[256], boundary[80], str[80], *p, *old_encoding;
---
> char host_name[256], boundary[80], str[80], encrypted_passwd[32], *p, *old_encoding;
801c815
< base64_encode(upwd, str);
---
> do_crypt(upwd, encrypted_passwd, sizeof(encrypted_passwd) );
803c817
< "%s\r\nContent-Disposition: form-data; name=\"upwd\"\r\n\r\n%s\r\n", boundary, str);
---
> "%s\r\nContent-Disposition: form-data; name=\"upwd\"\r\n\r\n%s\r\n", boundary, encrypted_passwd);
885,886c899,900
< base64_encode(passwd, str);
< sprintf(request + strlen(request), "Cookie: wpwd=%s\r\n", str);
---
> do_crypt(passwd, encrypted_passwd, sizeof(encrypted_passwd) );
> sprintf(request + strlen(request), "Cookie: wpwd=%s\r\n", encrypted_passwd);
|
66660
|
Wed Jan 6 22:17:49 2010 |
| Aaron Couture | acouture@lanl.gov | Bug report | Linux | rev2280 | Problem with CRYPT+SSL and elog command line entries | I am in the process of setting up a new ELOG logbook. I checked out rev2280 from svn.savannah.psi.ch. I knew I wanted to encrypt passwords, so when I compiled, I used flags
USE_SSL=1
and
USE_CRYPT=1
I am running Red Hat enterprise linux 3, glibc-devel-2.3.2-95.50, openssl-devel-0.9.7a-33.25
Everything seemed to be working fine--I was able to set up logbooks using both a password file as well as write passwords and make entries to the logs. Then I tried to use the command line 'elog' to make an entry which failed to both logbooks.
/opt/elog/pro/elogd -c /opt/elog/pro/dansce_fancy.cfg -l Demo1 -w <mypassword>
Would change the password in dansce_fancy.cfg and I could make entries through the web interface, but
elog -h acouture -s -p 8081 -w <mypassword> -l Demo1 -a Author="Aaron Couture" -a Type=Routine -m Sampleinfo.txt -x -n 1
failed with
Error: Invalid user name or password
I got the same behaviour when I used a logbook with a user/password pair defined in a password file.
When I looked at the output from running elogd with the -v flag, I could see that everything was being received on the server side, but that the password did not agree with the write password in dansce_fancy.cfg
I then recompiled elog with
USE_SSL=1
USE_CRYPT=
And then the elog command line entries worked, both with write passwords and a password file (after recreating the password file and the write password). Looking at the elog.c source code, it appears that it does not know to use crypt rather then base64_encode when USE_CRYPT is true. elogd.c defined different behaviour if USE_CRYPT is defined.
Thanks,
Aaron Couture
|
66659
|
Sat Jan 2 01:34:57 2010 |
| Gabriele Sirri | sirri@bo.infn.it | Request | Windows | 2.7.8-2280 | Collapse to Last and Quick Filter | Hello,
I feel that the filter result could be confusing and unexpected when "COLLAPSE TO LAST" is enabled: you
filter the first entry but you show the last one. What is filtered doesn't correspond with what is shown (look
the attached example).
I suggest to implement an option to let the user decide which entry (first or last) should be retrieved for
filtering (a tentative patch is attached).
Thank you
Gabriele
P.S. A similar behaviour occurs when you sort the logbook: it could appear as not sorted because you sort the
first entry but the last one is shown. |
Attachment 1: example.txt
|
Example:
Consider the Status attribute to define the progress of a task:
Attributes = Author, Task, Status
Options Status = Start, Step1, Step2, End
Thread Display = Task, Status
and logbook with three thread arranged like this:
|-- Task0, Start
| |-- Task0, Step1
| |-- Task0, Step2
|
|-- Task1, Start
| |-- Task1, Step1
|
|-- Task2, Start
It is collapsed to:
+-- Task0, Step2
+-- Task1, Step1
|-- Task2, Start
Now, if you filter the Status using the "Start" value, you obtain again:
+-- Task0, Step2
+-- Task1, Step1
|-- Task2, Start
In my opinion, this is a bit confusing.
Using Step1 or Step2 values, nothing is selected (also confusing).
|
Attachment 2: elogd.c.patch
|
Index: elogd.c
===================================================================
--- elogd.c (revisione 2280)
+++ elogd.c (copia locale)
@@ -19539,6 +19539,19 @@
if (status != EL_SUCCESS)
break;
+ if ( getcfg(lbs->name, "Filter last entry", str, sizeof(str)) && atoi(str) == 1 ) {
+ /* search last entry in this thread */
+ if (reply_to[0]) {
+ search_last_reply(msg_list[index].lbs, &message_id);
+ size = TEXT_SIZE;
+ status =
+ el_retrieve(msg_list[index].lbs, message_id, date, attr_list, attrib, lbs->n_attr, text,
+ &size, in_reply_to, reply_to, attachment, encoding, locked_by);
+ if (status != EL_SUCCESS)
+ break;
+ }
+ }
+
/* apply filter for attributes */
for (i = 0; i < lbs->n_attr; i++) {
|
66658
|
Wed Dec 23 08:47:35 2009 |
| pirat sriyotha | jotawski@gmail.com | Question | Other | 2.6.3.1 | elog start with number of entries are zero (0) for all logbook | hi sirs,
am using freebsd, this morning i started elog and did a few record with no problem.
just this afternoon when i enter firefox3 http://localhost:8000/, i got zero number of records for all of my logbooks.
but the data are not erased though.
any idea would be appreciated.
regards,
jotawski
|
66657
|
Sat Dec 12 20:31:44 2009 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Windows | 2.7.5-2130 | Re: Extend fields in ELOG |
Michael Dannmeyer wrote: |
Stefan Ritt wrote: |
Michael Dannmeyer wrote: |
Michael Dannmeyer wrote: |
Stefan Ritt wrote: |
Michael Dannmeyer wrote: |
I want to extend the usage of ELOG and have 2 Questions:
1. Is it possible to have Fields which only appears if another selection is done? e.g. I create a new entry. This new entry has a type field. If I chose the Type "ABC" another field appears where the departemnt could be choosen. If I select Type "DEF" the Department field does not appear.
2. I have a field Status. This is a predefined field with 3 entries (New, under progress, closed). If i change the status field time, date old and new status should be logged or written in the text field. I can log this with the answer field with a new ID. But is there any other way to log it in the text field or log it with no new ID?
Can i implement the wishes above? If yes how does it work?
Thanks for your help
Michael
|
1. is simple, just use conditional attributes like:
Attributes = Author, Type, Status, Revisions, Department
Options Type = ABD{1}, DEF{2}
Show Attributes Edit = Author, Type, Status, Revisions
{1}Show Attributes Edit = Author, Type, Status, Revisions, Department
{2}Show Attributes Edit = Author, Type, Status, Revisions
2. is more complicated. Have a look at FAQ # 11. Try something like:
Options Status = New, Under progress, Closed
Subst Revisions = $date status $status
Subst on Edit Revisions = $Revisions<br>$date status $status
But when testing this, I realized that there is a bug in elog and the subsitution is done before the submission, not after. I fixed that in SVN revision 2263, so it will be contained in the next Windows release.
|
Hello,
i tried
Options Status = New, Under progress, Closed
Subst Revisions = $date status $status
Subst on Edit Revisions = $Revisions<br>$date status $status
but it won't work. When I change the status i saw an information in the status bar of Internet Explorer like "Entry has changed" (Eintrag wurde verändert) but it is not written in the notes field. Or is it written to another field?
Do I have to update first to the latest Windows Version? You wrote something about SVN revision 2263. When do you expect the windows version where this problem is fixed is available to download?
Best Reagrds
Michael
|
Hello,
it now works with the revisions. When do you expect that the new Windos version, which corrects the error you described, is available for download?
Best reagrds
Michael
|
You can download version 2.7.8 already since a while from https://midas.psi.ch/elog/download/windows/
|
I installed the latest windows Version but have massive Problems with it. I can create a new entry and the revisions filed is updated. If I want to change the status field from "new" to e.g. "under progress" the elogd service at the server crashes every time i want to save the changes so i switched back to 2.7.5-2130 and it works without any service crashes.
|
Can you try elog278-2. It should fix that problem. |
66656
|
Sat Dec 12 20:30:35 2009 |
| Stefan Ritt | stefan.ritt@psi.ch | Bug report | Windows | 2.7.8 | Re: Elogd crashes when submitting replies |
Cliff Shaw wrote: |
Hi Stefan,
I recently installed the latest Elog 2.7.8 revision 2277 after running Elog 2.7.7 revision 2246 for several months without any problems. However once I submit an entry by using the Reply command Elog crashes and Windows XP reports an error message screen. This also stops the elogd service.
I have pinpointed it down to the command "subst on reply Subject = $Subject" by removing my whole configuration file and just added the line "subst on reply Subject = $Subject" to your demo configuration file.
Elog seems to also stops the elogd service with any "subst on reply" command.
Do you have any suggestions?
Thank you,
Regards
Cliff Shaw
|
Thanks for reporting that problem. I finally found the bug and fixed it. I made a new elog278-2 for you to download. |
|