Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions ax_browser_broker/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4135,7 +4135,11 @@ def _auth_portal_html(
floating_auth = ""
inline_password_controls = ""
if vnc:
embed_url = _novnc_embed_url(vnc, trusted_client)
# The /auth/<token> portal URL is itself the secret, so always auto-supply
# the VNC password to noVNC (previously gated on trusted_client, which left
# the viewer blank for the primary use case: the owner opening the portal
# from an untrusted device like their phone).
embed_url = _novnc_embed_url(vnc, True)
safe_embed_url = html.escape(embed_url, quote=True)
safe_open_url = html.escape(embed_url, quote=True)
if trusted_client:
Expand Down Expand Up @@ -4756,10 +4760,11 @@ async def auth_portal(token: str, request: Request) -> Any:
except AuthError as error:
raise HTTPException(status_code=410 if "expired" in str(error) or "is expired" in str(error) else 404, detail=str(error)) from error
vnc = current_auth_vnc(token)
start_error = None
start_error = str(auth_request_data.get("start_error") or "") or None
if vnc is None and AUTH_PORTAL_AUTOSTART:
try:
vnc = start_auth_vnc(token)
start_error = None
except AuthError as error:
redirect = _active_identity_control_redirect(auth_request_data, error)
if redirect:
Expand Down
Loading
Loading