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
This commit is contained in:
Stefan Bühler 2008-07-31 10:28:18 +00:00
parent 0c16fddde3
commit 3f791f46d5
2 changed files with 3 additions and 2 deletions

1
NEWS
View File

@ -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

View File

@ -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;