Browse Source

Fix mod_secdownload problem with unsigned time_t (#1688)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2255 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.20
Stefan Bühler 14 years ago
parent
commit
3f791f46d5
  1. 1
      NEWS
  2. 4
      src/mod_secure_download.c

1
NEWS

@ -38,6 +38,7 @@ NEWS
* replaced buffer_{append,copy}_string with the _len variant where possible (#1732) (thx crypt)
* case insensitive match for secdownload md5 token (#1710)
* Handle only HEAD, GET and POST in mod_dirlisting (same as in staticfile) (#1687)
* fixed mod_secdownload problem with unsigned time_t (#1688)
- 1.4.19 - 2008-03-10

4
src/mod_secure_download.c

@ -243,8 +243,8 @@ URIHANDLER_FUNC(mod_secdownload_uri_handler) {
}
/* timed-out */
if (srv->cur_ts - ts > p->conf.timeout ||
srv->cur_ts - ts < -p->conf.timeout) {
if ( (srv->cur_ts > ts && srv->cur_ts - ts > p->conf.timeout) ||
(srv->cur_ts < ts && ts - srv->cur_ts > p->conf.timeout) ) {
/* "Gone" as the url will never be valid again instead of "408 - Timeout" where the request may be repeated */
con->http_status = 410;

Loading…
Cancel
Save