Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon4.gif   elog utility for submission used wrong 'Host:' in POST header, posted by Heiko Scheit on Mon Jul 11 19:04:38 2005 
    icon4.gif   Re: elog utility for submission used wrong 'Host:' in POST header, posted by Emiliano Gabrielli on Tue Jul 12 10:15:30 2005 
       icon2.gif   Re: elog utility for submission used wrong 'Host:' in POST header, posted by Stefan Ritt on Wed Jul 20 21:03:29 2005 
Message ID: 1259     Entry time: Mon Jul 11 19:04:38 2005     Reply to this: 1260
Icon: Warning  Author: Heiko Scheit  Author Email: h.scheit@mpi-hd.mpg.de 
Category: Bug fix  OS: Linux  ELOG Version: 2.5.9 
Subject: elog utility for submission used wrong 'Host:' in POST header 
The 'elog' utility for commandline submission used wrong 'Host:' in POST header.
The host listed after 'Host:' should be the host where the server runs, not the 
localhost (see patch below).

$ diff -u elog.c_20050711  elog.c
--- elog.c_20050711     Mon Jul 11 18:54:20 2005
+++ elog.c      Mon Jul 11 18:55:31 2005
@@ -421,7 +421,7 @@
       sprintf(request + strlen(request), "%s/%d?cmd=download", experiment, message_id);
    strcat(request, " HTTP/1.0\r\n");
 
-   sprintf(request + strlen(request), "Host: %s\r\n", host_name);
+   sprintf(request + strlen(request), "Host: %s\r\n", host);
    sprintf(request + strlen(request), "User-Agent: ELOG\r\n");
 
    first = 1;
@@ -872,7 +872,7 @@
    strcat(request, " HTTP/1.0\r\n");
 
    sprintf(request + strlen(request), "Content-Type: multipart/form-data; boundary=%s\r\n", boundary);
-   sprintf(request + strlen(request), "Host: %s\r\n", host_name);
+   sprintf(request + strlen(request), "Host: %s\r\n", host);
    sprintf(request + strlen(request), "User-Agent: ELOG\r\n");
    sprintf(request + strlen(request), "Content-Length: %d\r\n", content_length);
ELOG V3.1.5-3fb85fa6