Skip to content

Bound a circuit's reliable list, keep a secure login on TLS, give up on an unanswered local teleport - #637

Merged
RyeMutt merged 3 commits into
developfrom
rye/local-teleport-reliable-list-login-redirect
Nov 5, 2026
Merged

RyeMutt merged 3 commits into
developfrom
rye/local-teleport-reliable-list-login-redirect

Conversation

@RyeMutt

@RyeMutt RyeMutt commented Nov 4, 2026

Copy link
Copy Markdown
Member

Summary

Three separate client-side defects, one commit each.

A peer that never pings grew a circuit's list of reliable packets without limit. mRecentlyReceivedReliablePackets shrinks only when the peer's StartPingCheck names its oldest unacked. It now holds 65536, and the oldest number goes first: the first past the highest seen, since numbers wrap, or else the lowest. A number forgotten this way is handled again if a resend of it comes, which takes 65536 newer reliable packets arriving with no ping between them.

A login over https could be redirected to http, carrying the credentials. This could happen two ways, and both are closed:

  • The login answer's next_url. loginCoro resends the same parameters to wherever it says. It now ends with a failure that says why (LoginFailedInsecureRedirect).
  • An HTTP redirect. libcurl follows redirects for XML-RPC, and a 307 or 308 sends a POST's body on as it is. XML-RPC over https now sets the new HttpOptions::setRedirectsHttpsOnly, which limits libcurl's redirects to https. Other requests follow redirects as before.

A plain http login, as on a local grid, isn't held to this. A grid whose https login server redirects to http will now fail to log in, which is the point, but it is a visible change for such a grid.

A teleport inside the region with no answer blocked every later teleport. TELEPORT_LOCAL leaves gTeleportDisplay false until TeleportLocal comes, so update_tp_display, which gives up on a late teleport, doesn't run for it. If neither TeleportLocal nor TeleportFailed came, teleportCore refused every later teleport for the rest of the session. The timer now starts as the teleport is asked for, and it's given up on after the same wait as any other: 15 s, and 3 s per attachment. An answer that comes later still moves the agent.

Testing

  • llcircuit_test, lllogin_test and llcorehttp_tests gain cases. With each fix withheld, the cases that should catch it failed, and mutants of the fixes were caught.
  • ctest -L "llmessage|lllogin|llcorehttp" -LE manual passes 44 of 44 on Windows. That ran on the branch before A face an object gains takes its own texture entry, material and override #633, Object updates and kills keep to the objects they name, and two patch code fixes #635 and A packet number past 24 bits no longer hangs the message system #636 merged; it merges cleanly over them, and macOS, Linux and the merged result are left to CI.
  • newview's three changed files were compiled alone. The viewer wasn't linked.
  • The teleport fix has no test and hasn't been run in world. newview has no harness for the teleport state. To check it, add TeleportLocal under messageBans/trusted in app_settings/message.xml and teleport within the region: "Giving up on a teleport inside the region" is logged after 15 s plus 3 s per attachment, and the next teleport is accepted.
  • A redirect to https under the new option isn't run, since the test peer has no TLS. The tests run the refusal and the default against a redirect to http.

🤖 Generated with Claude Code

RyeMutt and others added 3 commits November 4, 2026 05:13
…packets

The list of reliable packets kept for duplicate suppression shrinks only when
the peer's StartPingCheck names its oldest unacked. A peer that sends reliable
packets and no pings grew it by a map node per number, with 2^24 numbers before
they repeat.

It now holds 65536. The one that goes is the oldest number, the first past the
highest seen, since numbers wrap, or else the lowest. A number forgotten this
way is handled again if a resend of it comes, which takes 65536 newer reliable
packets arriving with no ping between them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A login's next attempt sends the user's credentials to wherever the last answer's
next_url says, and a login over https would follow it to http. It now ends with
a failure that says why (LoginFailedInsecureRedirect). A plain login, as on a
local grid, isn't held to this.

The same could happen a level down. libcurl follows redirects for XML-RPC, and a
307 or 308 sends a POST's body on as it is, so one from an https login server to
http sent the credentials in the clear. XML-RPC over https now sets the new
HttpOptions::setRedirectsHttpsOnly, which limits libcurl's redirects to https
and fails the request with CURLE_UNSUPPORTED_PROTOCOL otherwise. Other requests
follow redirects as before.

The test peer has no TLS, so the tests run the refusal and the default against
a redirect to http. A redirect to https under the option isn't run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A teleport inside the agent's region sets TELEPORT_LOCAL, and gTeleportDisplay
stays false until TeleportLocal comes, so update_tp_display, which gives up on a
teleport past its time, doesn't run for it. If neither TeleportLocal nor
TeleportFailed came, the state stayed for the rest of the session, and
teleportCore refused every later teleport as one made while teleporting.

The timer now starts as the teleport is asked for, and display gives it up after
the same time as any other: 15 s, and 3 s per attachment. An answer that comes
later is handled as one with no teleport under way, which still moves the agent.

No test covers this, since newview has no harness for the teleport state. To
check it in world, add TeleportLocal under messageBans/trusted in
app_settings/message.xml and teleport within the region: "Giving up on a teleport
inside the region" is logged after 15 s, and the next teleport is accepted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 26 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1ccdc7bd-201c-4405-ab09-49fa975d035b
Commits

Reviewing files that changed from the base of the PR and between acc3866 and 647ad88.

Files selected for processing: 15
  • indra/llcorehttp/_httpoprequest.cpp
  • indra/llcorehttp/httpoptions.cpp
  • indra/llcorehttp/httpoptions.h
  • indra/llcorehttp/tests/httprequest_test.cpp
  • indra/llcorehttp/tests/test_llcorehttp_peer.py
  • indra/llmessage/llcircuit.cpp
  • indra/llmessage/llcircuit.h
  • indra/llmessage/message.cpp
  • indra/llmessage/tests/llcircuit_test.cpp
  • indra/newview/llagent.cpp
  • indra/newview/llviewerdisplay.cpp
  • indra/newview/llxmlrpctransaction.cpp
  • indra/newview/skins/default/xui/en/strings.xml
  • indra/viewer_components/login/lllogin.cpp
  • indra/viewer_components/login/tests/lllogin_test.cpp
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@RyeMutt
RyeMutt merged commit 66e2acf into develop Nov 5, 2026
23 checks passed
@RyeMutt
RyeMutt deleted the rye/local-teleport-reliable-list-login-redirect branch November 5, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant