Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 186 of 806  Not logged in ELOG logo
    icon2.gif   Re: How to prevent file path leaks on a 404 page, posted by Stefan Ritt on Tue Aug 4 13:44:01 2020 

I removed the version info from the 404 error, but you have to recompile elogd from sources. The fix will be included in the next RPM, but that can usually take a few weeks.

Rich Loring wrote:

Hello,

We used the Elog RPM binary installation method to install Elog. Our security scanners are complaining that Elog discloses the version information when you hit a missing page (404 error).  How can I hide this version info? Is there a snippet of code somewhere that I can comment out?

Any help is appreciated.

-Rich

 

icon3.gif   SSL connection drop with large content, posted by HyonSan Seo on Mon Aug 10 07:56:43 2020 

Dear all,

 

I had some difficulty to upload large files (>20MB) with SSL connection. I think it is also related to https://elog.psi.ch/elogs/Forum/68636

During debuging, I found that, when uploading large files, ssl connection is dropped since 'SSL_read' function returns -1.

But it doesn't alway mean broken connection. It may be "SSL_ERROR_WANT_READ".

I changed the "server_loop" function in the source code to "continue" when it is SSL_ERROR_WANT_READ. And it fixed the problem.

Here is my code.


## elogd.c "server_loop" function L30031

                        if (FD_ISSET(_sock, &readfds)) {
#ifdef HAVE_SSL
                          if (_ssl_flag){
                            i = SSL_read(_ssl_con, net_buffer + len, net_buffer_size - len);
                            if(i<=0){
                              int ssl_error=SSL_get_error(_ssl_con,i);    ## check ssl error code
                              if(ssl_error==SSL_ERROR_WANT_READ||ssl_error==SSL_ERROR_WANT_WRITE) continue;    ## if ssl wants more, continue
                            }
                          }
                          else
#endif
                            i = recv(_sock, net_buffer + len, net_buffer_size - len, 0);
 


 

I am ignorant about networking. Some experts on ssl connection would know a better way to deal with this problem.

 

Best,

HyonSan Seo

 

    icon2.gif   Re: SSL connection drop with large content, posted by Stefan Ritt on Mon Aug 10 08:33:42 2020 

Your solution sounds quite good, I will incorporate them in the distribution.

Stefan

HyonSan Seo wrote:

Dear all,

 

I had some difficulty to upload large files (>20MB) with SSL connection. I think it is also related to https://elog.psi.ch/elogs/Forum/68636

During debuging, I found that, when uploading large files, ssl connection is dropped since 'SSL_read' function returns -1.

But it doesn't alway mean broken connection. It may be "SSL_ERROR_WANT_READ".

I changed the "server_loop" function in the source code to "continue" when it is SSL_ERROR_WANT_READ. And it fixed the problem.

Here is my code.


## elogd.c "server_loop" function L30031

                        if (FD_ISSET(_sock, &readfds)) {
#ifdef HAVE_SSL
                          if (_ssl_flag){
                            i = SSL_read(_ssl_con, net_buffer + len, net_buffer_size - len);
                            if(i<=0){
                              int ssl_error=SSL_get_error(_ssl_con,i);    ## check ssl error code
                              if(ssl_error==SSL_ERROR_WANT_READ||ssl_error==SSL_ERROR_WANT_WRITE) continue;    ## if ssl wants more, continue
                            }
                          }
                          else
#endif
                            i = recv(_sock, net_buffer + len, net_buffer_size - len, 0);
 


 

I am ignorant about networking. Some experts on ssl connection would know a better way to deal with this problem.

 

Best,

HyonSan Seo

 

 

    icon2.gif   Re: How to prevent file path leaks on a 404 page, posted by Stefan Ritt on Wed Aug 26 20:44:38 2020 

A new RPM has been released at https://elog.psi.ch/elog/download/RPMS/elog-3.1.4-2.el7.x86_64.rpm containing that fix.

Stefan Ritt wrote:

I removed the version info from the 404 error, but you have to recompile elogd from sources. The fix will be included in the next RPM, but that can usually take a few weeks.

Rich Loring wrote:

Hello,

We used the Elog RPM binary installation method to install Elog. Our security scanners are complaining that Elog discloses the version information when you hit a missing page (404 error).  How can I hide this version info? Is there a snippet of code somewhere that I can comment out?

Any help is appreciated.

-Rich

 

 

    icon2.gif   Re: testing the client: unclear it worked, posted by Jose Caballero on Mon Sep 14 15:40:02 2020 

Sorry for the late reply. I didn't get email notification about an answer to my question :)

Actually, I just wrote <hostname> and so on for privacy. In my attempt, they have real values. 

And yet, I got as result: "Message successfully transmitted, ID=-1".

Follow up question: do I really need to install everything even though I only want the client? Or is there somewhere a package just with the client code?

Thanks

Jose

Stefan Ritt wrote:

The <hostname> you have to actually replace with your real host name. Same for logbook, username and password. 

On my local test system I get (actual password hidden here with "...")

~$ elog -h localhost -p 8080 -l demo -u stefan ... -a Authort=SR -a Subject=test  test
Message successfully transmitted, ID=5
~$ 

Jose Caballero wrote:

Hello,

I just gave it a quick try to the command line client, to see if I can use it to access our institution service. 


[root@host ~]# cd /tmp/
[root@host ~]# mkdir elog
[root@host ~]# cd elog
[root@host ~]# wget https://elog.psi.ch/elog/download/RPMS/elog-3.1.4-2.el7.x86_64.rpm
[root@host ~]# rpm2cpio elog-3.1.4-2.el7.x86_64.rpm | cpio -idmv
[root@host ~]# cd usr/local/bin/
[root@host ~]# ./elog --help
[root@host ~]# ./elog -h <hostname> -l <logbook> -u <myusername> <mypassword> -w last
"Message successfully transmitted, ID=-1"

 

Is that the expected output? I was expecting to see info about the latest message in the server.

Cheers,

Jose

 

 

icon5.gif   MEG style elog configuration, posted by Daniel Kohl on Sun Oct 25 06:26:49 2020 

Hello,

 

I'm new to elog software and I could not find a solution to my configuration issue. I would like to setup a configuration file similar to MEG experiment's elog.

https://elog.psi.ch/elogs/meg/

I'm interested in creating similar to the structure: "General", "Collaboratoin", "Sub-groups (with sub-sub groups "Software", "Hardware" etc). I cannot tell if this was created by using Top Group feature.

Can someone explain how this design structure can be achieved?

 

Thanks,

Daniel

    icon2.gif   Re: MEG style elog configuration, posted by Stefan Ritt on Mon Oct 26 11:42:53 2020 

It was done using the "groups" feature:

https://elog.psi.ch/elog/config.html#groups

Stefan

Daniel Kohl wrote:

Hello,

 

I'm new to elog software and I could not find a solution to my configuration issue. I would like to setup a configuration file similar to MEG experiment's elog.

https://elog.psi.ch/elogs/meg/

I'm interested in creating similar to the structure: "General", "Collaboratoin", "Sub-groups (with sub-sub groups "Software", "Hardware" etc). I cannot tell if this was created by using Top Group feature.

Can someone explain how this design structure can be achieved?

 

Thanks,

Daniel

 

icon6.gif   Style <attribute> and Cell Style <attribute> on the same row, posted by David Dunne on Tue Nov 17 12:10:07 2020 

Query

(FYI, OS = FreeBSD, Elog Version as showing on logon box = V3.1.4-)

Is it possible to use both Style <attribute> and Cell Style <attribute> on the same row?
For example, have a Logbook containing several Attributes and display a subset of those attributes in Summary Mode. Two attributes are of interest for this query which are part of the attributes displayed in Summary Mode, attributes ‘Assign Line’ and ‘Service’ 

If the ‘Attribute Assign Line = Assign 1’ then shade all cells in that row #808080
but if the ‘Attribute Service = 1600’ always shade that cell #7A5776 

Config file includes
Style Assign Line Assign 1 = background-color:#808080
Cell Style Service 1600 = background-color:#7A5776

The result is the row gets shaded #808080 if ‘Assign Line = Assign Line 1’ but fails to shade the Service cell colour #7A5776 if it equals 1600 

Extract from HTML source for the ‘1600’ cell when both conditions are correct shows both background-color values are present and the cell is styled the first value listed (which is Style Assign Line Assign 1 = background-color:#808080 but I always want #7A5776 for cell Service when it is of value 1600)
.
<td class="list2" style="background-color:#808080" style="background-color:#7A5776"><a href="../Daily/1">1600</a></td>  

Thank you,

David

ELOG V3.1.5-3fb85fa6