Reuqest to extract X-Forwarded-Name and X-Forwarded-Email when using webserver, posted by Liam Gaffney on Sun Dec 8 22:00:32 2024
|
When using the Webserver authentication in combination with "File" and "Self register = 3", it is possible to keep track of registrations and control access still. This is very useful, and upon clicking on the logbook for the first time, the user is asked to register by typing their username, full name and email address.
First issue here is that they can still edit the box with their username, which might cause confusion if somebody decides to choose a different username and is then surprised about why they cannot automatically login again. Is it possible to lock this field from being edited?
The second issue is more minor, but the user has to manually type their name and email address, even though the webserver may already be able to provide this information in the headers. Specifically, it would be useful to read the name from the X-Forwarded-Name header and email address from the X-Forwarded-Email header.
My config file snippet is below:
Authentication = Webserver, File
allow password change = 0
Password file = webserver.passwords
Self register = 3
|
Re: Probleme TLS, posted by Olivier MARTIN on Mon Dec 9 10:23:32 2024
|
Thanks,
Does email notification from a Gmail address work? It is noted that port 465 must be used for SSL use? Is this correct :
SMTP host : smtp.gmail.com
SMTP port = 465
SMTP username = monadresse@gmail.com
And, should I enter the password attached to my Gmail email and where?
Thanks in advance.
Stefan Ritt wrote: |
TSL is not implemented in ELOG. Maybe I find time some day to do that, but if we have any volunteers in our community who could help me with that I would appreciate.
Stefan
Olivier MARTIN wrote: |
Hello,
I would like to notify by email as soon as an entry is created or modified.
I declared my SMTP which uses TLS security.
The following error message appears : Erreur d'envoi de mail via "smtp.xxxx.xxx.xxx.fr": 5.7.0 Must issue a STARTTLS command first
Is there a solution ?
|
|
|
Re: Probleme TLS, posted by Konstantin Olchanski on Mon Dec 9 21:55:53 2024
|
What Stefan meant to say is that Elog does not implement sending email using encrypted SMTP over TLS.
In theory it could be implemented, but if you try to use it, you may find that most
destinations will reject you unless you have configured correct SPF records.
https://en.wikipedia.org/wiki/Sender_Policy_Framework
Even if you do everything right, joints like gmail may still reject you because
their AI decides you are a spammer, or just because they do not like you, and good
luck making them change their mind.
At TRIUMF, we configure elog to use unencrypted and unauthenticated SMTP
to smtp.triumf.ca, which has special rules to accept our email (no questions asked),
and our Microsoft email instance is configured to accept and forward email from
smpt.triumf.ca. Everything is done right, but we still see Fermilab's Microsoft
rejecting TRIUMF's Microsoft email once in a while.
K.O. |
Segfault on elog-3.1.5-1 when uploading file., posted by gary holman on Thu Dec 12 18:45:49 2024
|
I am receiving a segfault whenever I attempt to upload a file. Please see attached .txt for valgrind output. This occurs in version elog-3.1.5-1. I reverted back to version elog-3.1.4-3 and the segfault does not occur.
Segfault occurs in Elog version: elog-3.1.5-1
System:
Virtualization: kvm
Operating System: Ubuntu 24.04.1 LTS
Kernel: Linux 6.8.0-49-generic
Architecture: x86-64
Hardware Vendor: QEMU
Hardware Model: Standard PC _Q35 + ICH9, 2009_
Firmware Version: 1.15.0-1
Firmware Date: Tue 2014-04-01
Firmware Age: 10y 8month 1w 5d
Valgrind command: valgrind -v --leak-check=full --track-origins=yes ./elogd -s /usr/local/elog -c /var/www/elog/he6/elogd.cfg -f /var/run/elog/he6.pid
Steps to reproduce:
1. Login elog
2. Create new logbook entry
3. Attachement 1: Select Browse
4. Select any file.
5. Select Upload |
Re: Segfault on elog-3.1.5-1 when uploading file., posted by gary holman on Thu Dec 12 19:01:39 2024
|
Looks like duplicate report to https://elog.psi.ch/elogs/Forum/69826
gary holman wrote: |
I am receiving a segfault whenever I attempt to upload a file. Please see attached .txt for valgrind output. This occurs in version elog-3.1.5-1. I reverted back to version elog-3.1.4-3 and the segfault does not occur.
Segfault occurs in Elog version: elog-3.1.5-1
System:
Virtualization: kvm
Operating System: Ubuntu 24.04.1 LTS
Kernel: Linux 6.8.0-49-generic
Architecture: x86-64
Hardware Vendor: QEMU
Hardware Model: Standard PC _Q35 + ICH9, 2009_
Firmware Version: 1.15.0-1
Firmware Date: Tue 2014-04-01
Firmware Age: 10y 8month 1w 5d
Valgrind command: valgrind -v --leak-check=full --track-origins=yes ./elogd -s /usr/local/elog -c /var/www/elog/he6/elogd.cfg -f /var/run/elog/he6.pid
Steps to reproduce:
1. Login elog
2. Create new logbook entry
3. Attachement 1: Select Browse
4. Select any file.
5. Select Upload
|
|
Re: Segfault on elog-3.1.5-1 when uploading file., posted by gary holman on Thu Dec 12 19:01:39 2024
|
Looks like duplicate report to https://elog.psi.ch/elogs/Forum/69826
gary holman wrote: |
I am receiving a segfault whenever I attempt to upload a file. Please see attached .txt for valgrind output. This occurs in version elog-3.1.5-1. I reverted back to version elog-3.1.4-3 and the segfault does not occur.
Segfault occurs in Elog version: elog-3.1.5-1
System:
Virtualization: kvm
Operating System: Ubuntu 24.04.1 LTS
Kernel: Linux 6.8.0-49-generic
Architecture: x86-64
Hardware Vendor: QEMU
Hardware Model: Standard PC _Q35 + ICH9, 2009_
Firmware Version: 1.15.0-1
Firmware Date: Tue 2014-04-01
Firmware Age: 10y 8month 1w 5d
Valgrind command: valgrind -v --leak-check=full --track-origins=yes ./elogd -s /usr/local/elog -c /var/www/elog/he6/elogd.cfg -f /var/run/elog/he6.pid
Steps to reproduce:
1. Login elog
2. Create new logbook entry
3. Attachement 1: Select Browse
4. Select any file.
5. Select Upload
|
|
Re: Segfault on elog-3.1.5-1 when uploading file., posted by Stefan Ritt on Thu Dec 12 19:46:02 2024
|
A statement like "core dumped" does not help much. Same with valgrind memory leaks. I need a full strack trace with all parameters when the segment violation occurs. The easiest is when you run elogd vom inside gdb, and once you get the signal, do a "where" to see th full stack trace.
As you can see from this forum, there is absolutely no crash when you upload any file, so it must have to do with your config file or anything whcih is special in yoru environment. We have to find what this is so that I can reproduce it here.
Stefan |
Re: Segfault on elog-3.1.5-1 when uploading file., posted by gary holman on Thu Dec 12 20:29:40 2024
|
Thanks for further instructions here is full stack trace:
Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
warning: 44 ./nptl/pthread_kill.c: No such file or directory
(gdb) where
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x00007ffff764526e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x00007ffff76288ff in __GI_abort () at ./stdlib/abort.c:79
#5 0x00007ffff76297b6 in __libc_message_impl (fmt=fmt@entry=0x7ffff77ce765 "*** %s ***: terminated\n") at ../sysdeps/posix/libc_fatal.c:132
#6 0x00007ffff7736c19 in __GI___fortify_fail (msg=msg@entry=0x7ffff77ce74c "buffer overflow detected") at ./debug/fortify_fail.c:24
#7 0x00007ffff77365d4 in __GI___chk_fail () at ./debug/chk_fail.c:28
#8 0x00007ffff7738019 in __strlcpy_chk (s1=<optimized out>, s2=<optimized out>, n=<optimized out>, s1len=<optimized out>) at ./debug/strlcpy_chk.c:28
#9 0x000055555557ac8a in strlcpy (__n=356, __src=0x89ab3c42edf52f00 <error: Cannot access memory at address 0x89ab3c42edf52f00>, __dest=0x7ffffffd5370 "agarcia") at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:156
#10 el_submit_attachment (lbs=lbs@entry=0x5555566873d8, afilename=afilename@entry=0x7ffffffd57e0 "pfSense-UDP4-1194-yuhaosun-config.ovpn",
buffer=buffer@entry=0x5555566bba67 "dev tun\npersist-tun\npersist-key\ndata-ciphers AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305:AES-256-CBC\ndata-ciphers-fallback AES-256-CBC\nauth SHA256\ntls-client\nclient\nresolv-retry infinite\nremote pfsense."...,
buffer_size=buffer_size@entry=5265, full_name=full_name@entry=0x7ffffffd58e0 "") at src/elogd.cxx:4547
#11 0x00005555555f91ea in decode_post (logbook=logbook@entry=0x7fffffffbff0 "He6", lbs=lbs@entry=0x5555566873d8, string=<optimized out>,
string@entry=0x5555566bb1c9 '-' <repeats 29 times>, "16417726823211458101306576170\r\nContent-Disposition: form-data; name=\"unm\"\r\n\r\ngholman\r\n", '-' <repeats 29 times>, "16417726823211458101306576170\r\nContent-Disposition: form"...,
boundary=boundary@entry=0x7fffffffbef0 '-' <repeats 27 times>, "16417726823211458101306576170", length=length@entry=7649) at src/elogd.cxx:28662
#12 0x00005555555fb5cc in process_http_request (
crequest=crequest@entry=0x555556656658 "POST /He6/ HTTP/1.0\r\nHost: xxx.xxx.xxx.xxx\r\nX-Real-IP: 192.168.101.2\r\nX-Forwarded-For: 192.168.101.2\r\nConnection: close\r\nContent-Length: 7649\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win6"...,
i_conn=i_conn@entry=0) at src/elogd.cxx:29317
#13 0x00005555555ffc68 in server_loop () at src/elogd.cxx:30302
#14 0x000055555555b1b9 in main (argc=<optimized out>, argv=<optimized out>) at src/elogd.cxx:31327
(gdb)
Stefan Ritt wrote: |
A statement like "core dumped" does not help much. Same with valgrind memory leaks. I need a full strack trace with all parameters when the segment violation occurs. The easiest is when you run elogd vom inside gdb, and once you get the signal, do a "where" to see th full stack trace.
As you can see from this forum, there is absolutely no crash when you upload any file, so it must have to do with your config file or anything whcih is special in yoru environment. We have to find what this is so that I can reproduce it here.
Stefan
|
|
|