wopi: fix access_token_ttl (#1587)

This commit is contained in:
Danila Kamaev 2026-08-15 16:47:04 +04:00 committed by GitHub
parent 14e2d79b08
commit 92c3f32e13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -1703,7 +1703,7 @@ class HttpCli(object):
title=self.uparam["wopi"], title=self.uparam["wopi"],
url=url, url=url,
atoken=atoken, atoken=atoken,
ttl=session["expires"], ttl=int(session["expires"] * 1000),
).encode("utf-8", "replace") ).encode("utf-8", "replace")
self.reply(html, 200, "text/html; charset=utf-8") self.reply(html, 200, "text/html; charset=utf-8")

View file

@ -27,7 +27,7 @@ body {
<div style="display: none"> <div style="display: none">
<form action="{{ url }}" enctype="multipart/form-data" method="post" target="w" id="submit-form"> <form action="{{ url }}" enctype="multipart/form-data" method="post" target="w" id="submit-form">
<input name="access_token" value="{{ atoken }}" type="hidden" id="access-token"/> <input name="access_token" value="{{ atoken }}" type="hidden" id="access-token"/>
<input name="access_token_ttl" value="{{ ttl }}000" type="hidden" id="access-token_ttl"/> <input name="access_token_ttl" value="{{ ttl }}" type="hidden" id="access-token_ttl"/>
<input type="submit" value="" /> <input type="submit" value="" />
</form> </form>
</div> </div>