Skip to content

fix(ui): add fallback for crypto.randomUUID in non-secure contexts#132

Closed
ratulsarna wants to merge 1 commit intoopenclaw:mainfrom
ratulsarna:fix/crypto-uuid-http-fallback
Closed

fix(ui): add fallback for crypto.randomUUID in non-secure contexts#132
ratulsarna wants to merge 1 commit intoopenclaw:mainfrom
ratulsarna:fix/crypto-uuid-http-fallback

Conversation

@ratulsarna
Copy link
Copy Markdown
Contributor

Summary

  • Adds fallback UUID generator for HTTP contexts where crypto.randomUUID() is unavailable
  • Uses crypto.getRandomValues() which works in all contexts

Fixes #131

Test plan

  • Tested on http://100.x.x.x:18789 (Tailscale IP) - connects successfully
  • Verified UUID generation produces valid v4 UUIDs

🤖 Generated with Claude Code

@steipete
Copy link
Copy Markdown
Contributor

steipete commented Jan 3, 2026

Hi ratulsarna! Thanks for the PR! Where is this needed?

@steipete steipete added the question Further information is requested label Jan 3, 2026
@ratulsarna
Copy link
Copy Markdown
Contributor Author

Hi ratulsarna! Thanks for the PR! Where is this needed?

Accessing the web UI via Tailscale IP over HTTP (e.g., http://100.x.x.x:18789).

crypto.randomUUID() requires a secure context (HTTPS/localhost), so the UI fails to connect when accessed this way. The fallback uses crypto.getRandomValues() which works everywhere.

Happy to close if HTTPS is the expected setup for remote access.

crypto.randomUUID() requires HTTPS/localhost. When accessing the web UI
via HTTP (e.g., Tailscale or LAN IP), the browser throws an error.

Uses crypto.getRandomValues() as a fallback, which works in all contexts.

Fixes #131

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@ratulsarna ratulsarna force-pushed the fix/crypto-uuid-http-fallback branch from 4d1f595 to 3630652 Compare January 3, 2026 13:19
@ratulsarna
Copy link
Copy Markdown
Contributor Author

Closing this for now, shouldn't have relied on Opus. It missed a few things.

@ratulsarna ratulsarna closed this Jan 3, 2026
dgarson referenced this pull request in dgarson/clawdbot Feb 7, 2026
* feat: comprehensive refactoring and primitives proposals for later evaluation

* Evaluate design proposals and add md

* push readme

* feat: gemini pro assessment
slathrop referenced this pull request in slathrop/openclaw-js Feb 11, 2026
- Extract resolveRawHomeDir and gate resolveEffectiveHomeDir through path.resolve()
- Update resolveRequiredHomeDir to resolve process.cwd() fallback
- Fix shortenMeta: remove colon split that conflicts with Windows drive letters
- Update test assertions to use path.resolve() for expected values

Co-Authored-By: Claude Opus 4.6 <[email protected]>
slathrop referenced this pull request in slathrop/openclaw-js Feb 11, 2026
Tasks completed: 2/2
- Task 1: ChatType unification dm -> direct (#126)
- Task 2: Windows paths + cross-platform tests (#127, #132, #133)

Phase 13 complete (11/11 plans).

SUMMARY: .planning/phases/13-paths-config-refactoring/13-11-SUMMARY.md
github-actions bot pushed a commit to Piboonsak/openclaw_github that referenced this pull request Mar 12, 2026
Commandershadow9 pushed a commit to Commandershadow9/openclaw that referenced this pull request Mar 17, 2026
…enclaw#139 and .gitignore

- openclaw#134 [MEDIUM] docker-setup.sh: Mask OPENCLAW_GATEWAY_TOKEN in stdout
  (lines 259, 284, 288) - token no longer printed in plaintext
- openclaw#135 [MEDIUM] docker-compose.yml: Bind ports to 127.0.0.1 instead
  of 0.0.0.0 (18789, 18790); add docker-compose.secure.yml to Git
- openclaw#139 [MEDIUM] ci.yml: Pin GitHub Actions to SHA digests
  (setup-python@v5, setup-java@v4, setup-android@v3, setup-gradle@v4)
- .gitignore: Add .env.sandbox and .env.* entries (system fix openclaw#132)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
0x666c6f added a commit to 0x666c6f/openclaw that referenced this pull request Mar 26, 2026
…nclaw#132)

* feat(sre-config:PLA-962): switch primary model to Codex GPT 5.4 with 1M context

* fix(sre-config:PLA-962): drop responsesCompactThreshold, use openclaw default

* test(sre-config:PLA-962): update substrate test for codex primary model

* fix(sre-config:PLA-962): let sre agent inherit codex primary

* fix(sre-config:PLA-962): switch SRE runtime to direct OpenAI API

* fix(sre-config:PLA-962): resolve main merge conflict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web UI fails to connect over HTTP (non-HTTPS)

2 participants