diff options
author | Kim Alvefur <zash@zash.se> | 2023-07-21 17:23:00 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-07-21 17:23:00 +0200 |
commit | 99cca59d6e53584e8e72e64af4b205f9802bec07 (patch) | |
tree | 9a73bfe95f60446e0d270ee95273070521d0de12 /plugins/mod_http_file_share.lua | |
parent | 91d95d4c334ed24c4a1aaa8308c89b0b7359f99b (diff) | |
download | prosody-99cca59d6e53584e8e72e64af4b205f9802bec07.tar.gz prosody-99cca59d6e53584e8e72e64af4b205f9802bec07.zip |
plugins: Handle how get_option_period returns "never"
Diffstat (limited to 'plugins/mod_http_file_share.lua')
-rw-r--r-- | plugins/mod_http_file_share.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua index 08d6a90e..a1c725f8 100644 --- a/plugins/mod_http_file_share.lua +++ b/plugins/mod_http_file_share.lua @@ -176,7 +176,7 @@ function get_authz(slot, uploader, filename, filesize, filetype) -- slot properties slot = slot; - expires = expiry >= 0 and (os.time()+expiry) or nil; + expires = expiry < math.huge and (os.time()+expiry) or nil; -- file properties filename = filename; filesize = filesize; |