fix: show OUTLINE_TOKEN in full, drop TS_AUTHKEY from UI config panel
All checks were successful
Deploy / deploy (push) Successful in 11s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-03-08 12:07:02 +01:00
parent 4efc3cb4af
commit 258990894d

View File

@@ -495,16 +495,8 @@ async def dashboard():
pull_html = _sync_entry_html(s["last_pull"]) pull_html = _sync_entry_html(s["last_pull"])
push_html = _sync_entry_html(s["last_push"]) push_html = _sync_entry_html(s["last_push"])
def _mask(val: str) -> str:
if not val:
return '<span style="color:#dc3545">NOT SET</span>'
if len(val) <= 10:
return "***"
return f'<code>{val[:6]}***{val[-4:]}</code>'
outline_url = os.environ.get("OUTLINE_URL", "") outline_url = os.environ.get("OUTLINE_URL", "")
outline_tok = _mask(os.environ.get("OUTLINE_TOKEN", "")) outline_tok = os.environ.get("OUTLINE_TOKEN", "") or '<span style="color:#dc3545">NOT SET</span>'
ts_authkey = _mask(os.environ.get("TS_AUTHKEY", ""))
body = f""" body = f"""
<div class="card"> <div class="card">
@@ -528,8 +520,7 @@ async def dashboard():
<table> <table>
<tr><th>Key</th><th>Value</th></tr> <tr><th>Key</th><th>Value</th></tr>
<tr><td>OUTLINE_URL</td><td><code>{outline_url or '<span style="color:#dc3545">NOT SET</span>'}</code></td></tr> <tr><td>OUTLINE_URL</td><td><code>{outline_url or '<span style="color:#dc3545">NOT SET</span>'}</code></td></tr>
<tr><td>OUTLINE_TOKEN</td><td>{outline_tok}</td></tr> <tr><td>OUTLINE_TOKEN</td><td><code>{outline_tok}</code></td></tr>
<tr><td>TS_AUTHKEY</td><td>{ts_authkey}</td></tr>
<tr><td>APP_VERSION</td><td><code>{APP_VERSION}</code></td></tr> <tr><td>APP_VERSION</td><td><code>{APP_VERSION}</code></td></tr>
</table> </table>
</div>""" </div>"""