diff --git a/copyparty/util.py b/copyparty/util.py index 49a279fa..c2d981d2 100644 --- a/copyparty/util.py +++ b/copyparty/util.py @@ -643,6 +643,9 @@ class HMaccas(object): try: return self.cache[msg] except: + if len(self.cache) > 9000: + self.cache = {} + zb = hmac.new(self.key, msg, hashlib.sha512).digest() zs = base64.urlsafe_b64encode(zb)[: self.retlen].decode("utf-8") self.cache[msg] = zs diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 61487a79..4ea36482 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -4658,7 +4658,7 @@ var treectl = (function () { setwrap(bcfg_bind(r, 'wtree', 'wraptree', true, setwrap)); setwrap(bcfg_bind(r, 'parpane', 'parpane', true, onscroll)); bcfg_bind(r, 'htree', 'hovertree', false, reload_tree); - bcfg_bind(r, 'ask', 'bd_ask', false); + bcfg_bind(r, 'ask', 'bd_ask', MOBILE); ebi('bd_lim').value = r.lim = icfg_get('bd_lim'); ebi('bd_lim').oninput = function (e) { var n = parseInt(this.value);