1 $nostromo: ChangeLog,v 1.229 2016/04/12 19:15:04 hacki Exp $ 2 31.9.6 4===== 5- Restore original errno value after handling SIGCHLD. Otherwise 6 this could lead to a break out of the main select(2) loop and therefore 7 of unexpected termination of nostromo. 8 Spotted by Adam Wozniak, nice catch! 9- Change the crypt(3) API, which is used for basic authentication, to 10 accept all supported algorithms not just DES. 11- Check crypt(3) for returning NULL to prevent the nhttpd process to core 12 dump in this case. 13- Add server cache for basic authentication credentials to speed up 14 performance. This will save us filesystem access to htpasswd and additional 15 password encryption cpu cycles for crypt(3). 16- Add MD5, Blowfish-a, and Blowfish-b algorithm to the crypt(1) tool. 17- Replace rand(3) with arc4random(3) in the crypt(1) tool for OpenBSD, 18 NetBSD, and FreeBSD. 19- Fix broken BSD authentication method for basic authentication. 20- Fix several bites to make nostromo compile cleanly on the tested 21 platforms again which are OpenBSD, NetBSD, FreeBSD, and Linux. 22- Rewrote printenv CGI from perl to shell script. 23- Add support for SIGHUP configuration reload. 24- Make a child process use the default signals instead inheriting the 25 parent process signal handler. This fixes some odd issues. 26- Update copyright year to 2004 - 2016 and add nostromo CVS Id to all files. 27 281.9.5 29===== 30- Handle "Location:" field correctly when passed by a CGI. 31 Bug reported by Axel Gonzalez. 32 331.9.4 34===== 35- Update copyright year to 2004 - 2011. 36- Make nostromo compile again by default; Remove -Werror in src/nhttpd 37 makefiles and #include <sys/param.h> to src/nhttpd/main.c. 38- Fix a bug where when nostromo doesn't run in chroot mode somebody can 39 access files beyond our htdocs environment by using specific encoded 40 characters in the request URI (security issue). 41 Issue found and reported by RedTeam Pentesting GmbH. 42- Fix a bug where in certain conditions garbage is written into the access_log 43 user agent field. 44- Do proper handling of max. file descriptors and allow to bump the 45 select(2) max. file descriptors limit (FD_SETSIZE) via the CON define in 46 config.h by dynamically allocating the fd_sets. 47 481.9.3 49===== 50- Fix two err(3) calls which are lacking an `%s' modifier (security issue). 51 Patch from Simon Kuhnle. 52- Fix wrong select() / send_file() looping (resulting in high process load 53 occasionally), by fixing bogus EAGAIN error handling in sys_write_a(). 54- Fix missing ``.Ed'' in nhttpd.8 man page. 55 561.9.2 57===== 58- Fix a bug where a 403 response is returned instead of a 404 response. 59 Patch from Szabolcs Nagy. 60- Style diff which fixes spacing from Daniel Ouellet. 61- Add optional ``homedirs_public'' configuration parameter to restrict access 62 within the home directories. Suggested by Simon Kuhnle. 63- Add mandatory ``serverlisten'' configuration parameter to allow specific 64 interface binding. 65- Replaced libmy with latest version libmy-1.7. 66 671.9.1 68===== 69- Replace off_t with intmax_t integer type since problems have been reported 70 with compiling on some 64bit Linux systems. Therefore we remove the GNU 71 compiler option '-D_FILE_OFFSET_BITS=64'. Initial diff received from 72 Kurt Roeckx. 73- For unused, string based configuration options, use '\0' instead strlcpy() 74 '0' into the array. It's less disturbing and more straight. 75 Diff received from Szabolcs Nagy. 76- Don't leave some alias specific buffers uninitialized, because it can 77 happen that we access those later. Bug reported by Szabolcs Nagy. 78- According to RFC 3875 set the SERVER_NAME environment variable dynamicly 79 dependend on the "Host:" request header field instead setting it staticly 80 to the configured servername. Bug reported by Szabolcs Nagy. 81- Fix a bug where a CGI "Status:" request for 403 or 404 caused a corrupt 82 response header. Bug reported by Szabolcs Nagy. 83- The header field "Host:" is mandatory for HTTP/1.1 client requests. 84 If it doesn't exist return 400 Bad Request instead of further processing 85 the request. Bug reported by Szabolcs Nagy. 86- Drop MacOSX support. Too many tweaks with recent MacOSX versions for 87 compiling. 88- Update copyright year to 2004 - 2009. 89- Fix sys_log() by replacing syslog() with vsyslog() so the string 90 arguments get passed. While here move from LOG_DEBUG to LOG_INFO. 91- Replaced libmy with latest version libmy-1.6. 92 931.9 94=== 95- Replace server log parameter entries in the man page by syslog(3). 96 971.8.9 98===== 99- send all server log messages to syslog(3) instead to our own log file 100 The configuration parameter "logserver" is obsolete therefore and has 101 been removed from nhttpd.conf. Suggested by Matthias-Christian Ott 102- Make "logpid" and "logaccess" configuration parameters optional, which 103 allows it to disable pid and access log creation. Suggested by 104 Matthias-Christian Ott. 105- Remove the whole BSD authentication code on non-OpenBSD systems. 106 Diff received from Matthias-Christian Ott. 107 1081.8.8 109===== 110- Fix a bug where a requested file with size 0 caused us to send an HTTP 111 repsonse in a loop. Bug reported by Kai Hendry. 112- Fix a bug where a directory request without trailing "/" to a virtual host 113 URL returned a wrong 301-Location field value. Bug reported by Kai Hendry. 114- Change mime types parsing to the default syntax; extensions are separated 115 by spaces instead by commas. Our default mime types file (conf/mimes) has 116 been changed to the new syntax therefore. 117- Also check if HTTPS requests do match to our default URL before searching 118 for virtual hosts. 119 1201.8.7 121===== 122- Fix security issue for none chroot environments reported by Ben Hutchings: 123 Disallow any direct access to upper level directories (..). On occurrence 124 of a "/../" string in the request URI we return 400 Bad Request now. This 125 prevents access to files beyond of the serverroot directory. 126- Fix a bug reported by Szabolcs Nagy: If a CGI option ends with a "/" 127 don't apply the docindex to it. 128- If the PID file can't be created also report about the full filename in 129 the error log. Requested by Kai Hendry. 130 1311.8.6 132===== 133- Handle POST requests with content length 0 correctly, diff received 134 from Georg Wendenburg. 135 1361.8.5 137===== 138- Added support for SSLv3. 139- Replaced a strlcpy() with memcpy() because at this point binary data 140 could be involved. Pointed out by Georg Wendenburg. 141- Added CONTENT_TYPE CGI env, diff received from Georg Wendenburg. 142- Quiet down error messages in the server log file by moving some common 143 error messages to the debug mode output. 144 1451.8.4 146===== 147- If a select(2) error in the main loop is not EINTR, we shutdown the 148 server. EFAULT, EBADF, and EINVAL are not acceptable. 149- When a connection gets closed FD_CLR() the write set also in either case. 150 this fix should finally let get us rid from the select(2) EBADF error, 151 and overwrites the EBADF workaround fix from version 1.8.3. 152 1531.8.3 154===== 155- Fix a Linux tweak with off_t by adding -D_FILE_OFFSET_BITS=64 to the 156 compiler options. 157- If a select(2) error in the main loop is not EINTR, close the connection. 158 this avoids endless looping e.g. when EBADF occurs. 159- Typo corrections for nhttpd.conf-dist and nhttpd.8 from Will Maier. 160 1611.8.2 162===== 163- Fix wrong version numbers. 164 1651.8.1 166===== 167- Fixed gcc3 tweak with variable array definition which caused compiliation 168 error on gcc2 platforms. 169- Replaced libmy with latest version libmy-1.5. 170 1711.8 172=== 173- Added homedirs support. 174- Added basic authentication via BSD authentication. 175- Moved variable type for filesizes from int to off_t to enable proper 176 transfers of very large files. 177- Directory listing files are sorted alphabetical now. 178- Make our HTML output HTML 4.01 transitional. 179- Fixed man page typos. 180 1811.7.9 182===== 183- The rewritten http_header_comp() function implemented in version 1.7.7 184 could lead to a buffer overflow in some circumstances because the arrived 185 header sequence was not checked for its minimum size. On my machines 186 this effect ended up in a immediately process termination. Nasty bug 187 fixed now. While we are at this function we also get rid of strlen() 188 because we already have the current header size saved in our connection 189 structure; safer and faster. 190- Fixed man page typos. 191 1921.7.8 193===== 194- CGIs are no longer determined by a CGI alias. nhttpd checks now if a 195 file has the world executable flag set, and if yes the file is handled 196 as a CGI. this allows you to place CGIs anywhere in your document root, 197 and also to use CGIs as index. the cgiroot and cgiindex config options 198 are obsolete therefore and where removed from the configfile. cgi-bin 199 has moved to htdocs/cgi-bin 200- Use stat(2) S_IROTH instead of access(2) to check for file permissions, 201 as we have that information already. 202- Added HTTP_ACCEPT_ENCODING CGI env 203- Simplified debug logging. 204- Fixed broken permissions checking on directories. 205- Fixed another binary data handling issue in CGI main loop. 206- Improved error handling for select(2) in CGI main loop. 207- On a fatal error at CGI execution send a 500 before exit(3). 208- Extended man page. 209 2101.7.7 211===== 212- http_header_comp() which checks if a complete header sequence arrived got 213 unreliable because of our new asynchronous connection handling since version 214 1.7.6. The function is fixed now and as a side effect much more 215 simplified using less resources. 216 2171.7.6 218===== 219- Rewrote nostromo to handle connections fully asynchronous over one single 220 select(2) now. This change also fixes the problem that slow connections 221 walked into a connection timeout. 222- The socket send buffer size is now kept to the operating system value by 223 default. It can be changed optional in config.h by the SBS define. 224- Added debug mode option. 225- Added IF_MODIFIED_SINCE CGI env, diff received from Daniel Hartmeier. 226- Fixed unterminated childs leftover when parent is killed. 227- Fixed broken pipeline connection handling. 228- Fixed http_chunk() to handle also binary data now. 229- Fixed double printing of server port in the signature. 230- Fixed double creation of Location header field for CGIs. 231- Fixed wrong Location string for 301 responses over SSL non-default port. 232- Fixed access log variable which could be used uninitialized. 233- Fixed broken custom responses. on large custom response files, the transfer 234 was aborted. 235- Disabled chunking for HTTP/1.0 clients. 236- Disabled case sensitivy for HTTP protocol. 237- Reorderd configuration file. 238- Removed a unnecessary getpid(2) when daemonizing. 239- Replaced signal handlers SIGTERM code with a volatile sig_atomic_t flag. 240- Extended man page. 241- Improved style / KNF. 242 2431.7.5 244===== 245- Set SO_SNDBUF size on accepted client socket, not on the listener socket, 246 because not every tcp/ip implementation supports inheritance. 247- Set sockets to O_NONBLOCK to prevent any possible blocks. 248 2491.7.4 250===== 251- Fixed POST content size limitation of 8KB. POST content can now be 252 unlimited and is handled in the forked CGI process itself. 253- Removed all setenv(3) and unsetenv(3) functions and set CGI environment vars 254 with execve(2) instead. This has increased the CGI serving performance about 255 the factor 8. 256- The DOCUMENT_ROOT CGI environment variable was set wrong in some cases. 257 Bug fixed now. 258- In some cases the GMT offset was wrong calculated in the access log. 259 Bug fixed now 260 2611.7.3 262===== 263- Optimized performance and memory usage by source code optimization. 264- If a CGI post body included binary data the processing was aborted because 265 we could not handle the binary part. Bug fixed now. 266- If a CGI post body was terminated with '\r\n' and some browsers count that 267 to its content length (and some do not, what a mess!) the post was ignored. 268 Bug fixed now 269- If the defined setuid user was not found, output a custom error instead the 270 getpwnam(3) errno which almost says nothing. 271- Removed -ansi compile option to follow OpenBSD. 272- Fixed -pedantic compile option source code quirks. 273- Replaced libmy with latest version libmy-1.4. 274- Changed logo URL. 275- Applied typo diff for man page received from Marc Balmer@. 276 2771.7.2 278===== 279- Added custom 401, 403, and 404 responses, requested by Marc Winiger. 280- Added nph CGI support. 281- Close all file descriptors which do not belong to the child after fork(2). 282- Replaced recv(2) with read(2) as we do not use flags. 283- Replaced send(2) with write(2) as we do not use flags. 284- Check more system calls for EINTR. 285- If a CGI post body was terminated with '\r\n', we did not parsed that and 286 the post was ignored. Bug fixed now. 287- In some cases we had wrong data transmission because write(2) was not checked 288 for short writes. Bug fixed now. 289- Fixed SSL memory leak. 290 2911.7.1 292===== 293- Implemented HEAD method. 294- If on basic authentication the realm option in a htaccess file could not 295 be parsed, we just kept the last value in the realm variable instead of 296 overwriting it with "unknown realm". Bug fixed now. 297 2981.7 299=== 300- Added 206 Partial Content. Forced by Delta. 301- Added example lines to configuration file how to change default port 80. 302- Excluded sin6_len for Linux. 303- Imported new nostromo logo. 304- It is possible now to run IPv6 only. 305- Deny to run nhttpd as root. 306- Improved SSL handshake. 307- Main select(2) checks now writefds to cleanly serve partial file sends 308- Fixed typos and reviewed source code for BSD style. 309- If 301 Moved Permanently was called with https, we switched back to http 310 because we did not check for the https flag. Bug fixed now. 311 3121.6 313=== 314- Added IPv6 support. 315- Added pid file creation. 316- Set listener sockets to SO_REUSEADDR. 317- Moved a bunch of static environment variables to dynamic ones, because of 318 SSL and IPv6 introduction. 319- CGI https environment variable was set wrong because asking the wrong ssl 320 flag variable. Bug fixed now. 321- If running in chroot mode, virtual hosts and aliases where not found because 322 we accessed the full path to the config file. Bug fixed now. 323- If returning 500 on file send errors, open files where not closed. 324 Bug fixed now. 325 3261.5.1 327===== 328- chroot mode caused process hang if /dev/null where not found in the chroot 329 environment. Bug fixed now. 330 3311.5 332=== 333- Added SSL support. 334- Added 403 Forbidden, what means that files are checked for read permissions 335 now instead returning 500 Internal Server Error if no access. 336- Added TODO file. 337- Corrected and extended man page. 338- If the content type was unknown the previous content type was sent, which is 339 wrong. Now the html content type will be send per default on unknown 340 content types. 341- select(2) for header and body read where using the same readset as the master 342 select(2) which is wrong. Using now own readset. 343 3441.4 345=== 346- Corrected the man page. 347- One of three access_log functions was still logging with two lines per hit. 348 Bug fixed now. 349 3501.3 351=== 352- Makefiles have been ported to compile also on NetBSD, FreeBSD, Linux and 353 MacOSX. 354- Reduced access_log to one line per hit instead of two. 355- Filenames including spaces in directory listing wasn't found, because the 356 href entry had no quotes. Bug fixed now. 357 3581.2 359=== 360- If a CGI was called which didn't exist, the last called CGI was executed 361 because the responsible variable, which holds the full executable path, 362 wasn't overwritten. bug fixed now. 363- Replaced libmy with latest version libmy-1.3 (fixes important security 364 issues). 365- Replaced last strcpy(3) with strlcpy(3). 366 3671.1 368=== 369- Increased socket send buffer to avoid send(2) blocking when buffer is full. 370- In server log removed unnecessary log messages, made the existing ones more 371 specific and added new log messages. 372- Removed pre-compiler debug informations because they made the source code 373 hard to read and where not really usable in action. 374 3751.0 376=== 377- Fixed memory leak. 378 3790.9 380=== 381- A wrong if-condition caused the nhttpd parent process to exit(0) if a 382 CGI was called which didn't exist. Bug fixed now. 383 3840.8 385=== 386- Nostromo has been rewritten from a fork(2) server to a select(2) server. 387 with this new method no more child forking for file requests is necessary 388 and the server performance increases therefore. 389- Increased performance by optimizing source code. 390- Replaced libmy with latest version libmy-1.2 (faster). 391- Added pre-compiler debug option to config.h. 392 3930.7 394=== 395- Sometimes a child process still hung because not all recv(2) was checked for 396 connection timeout. placed select(2) in front of all recv(2) to check timeout. 397- Fixed wrong version numbering at several places. 398- Added install script (Install). 399 4000.6 401=== 402- Sometimes a child process hung because of blocking recv(2). bug fixed now. 403- Replaced libmy with latest version libmy-1.1. 404- Added timestamps to server log file. 405- Added version option. 406 4070.5 408=== 409- nhttpd didn't chroot(2) because chroot(2) where placed before all 410 configuration files could be read. bug fixed now. 411 4120.4 413=== 414- libmy had missing #include <string.h> in flog.c, nsend.c, strlower.c 415 some architectures (e.g. sparc64) complained and stopped at compiling. 416 bug fixed now. 417 4180.3 419=== 420- nhttpd didn't handle http control characters (\r\n\r\n) in POSTs body entity, 421 and blocked at recv(2). bug fixed now. 422 4230.2 424=== 425- Changed default configfile path to /var/nostromo/conf/nhttpd.conf. 426- chdir/chroot will directly done after reading the configfile successfully. 427- SIGPIPE, SIGHUP, SIGQUIT, SIGALRM will be silently ignored now and don't 428 generate a server log anymore. 429 4300.1 431=== 432- Initial version. 433