overlay: point the locked-out visitor at an address, not a hostname - #2350
Merged
Conversation
widgetii
requested review from
cronyx,
flyrouter and
viktorxda
as code owners
September 1, 2026 20:12
PR Summary by QodoUse reachable SSH address in unclaimed-camera guidance
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can describe a rule in plain language on the Rules page and Qodo drafts it for you |
ssh root@camera 'command' against an unclaimed camera answered with http://<hostname>/, a name only the camera itself resolves, so pasting it into a browser went nowhere. Whoever hit this refusal reached the camera over SSH, and dropbear records the address they used in SSH_CONNECTION -- the one address their network provably routes -- so say that instead, with the hostname kept as the no-connection fallback and brackets added for an IPv6 literal in the URL alone, where a browser wants them and ssh does not.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Post-merge review on #2346: a non-interactive SSH attempt against an unclaimed camera is
refused with a pointer at
http://<hostname>/— a name only the camera itself resolves, sopasting it into a browser on the user's machine goes nowhere:
What this does
Whoever hit this refusal reached the camera over SSH, and dropbear records the address they
used in
SSH_CONNECTION("client-ip port server-ip port") — the one address their networkprovably routes. The refusal now names that address for both the
ssh root@…hint and theURL. The hostname stays only as the fallback for a local exec with no connection to read,
and an IPv6 literal gets brackets in the URL alone (a browser wants them, ssh refuses them).
Hardware tested on
hi3516ev300, imx335 lab bench camera (dlab), running the merged #2346 bits with this
script installed and root's shadow/passwd reset to the unclaimed state.
Evidence
Before — the review paste above (and identical on this camera).
After, reaching the camera by IP and by DNS name — both print the address the client used:
The same session then also exercised, on the merged majestic, the browser door end to end:
POST /setupwithouteula→ 400 with the enforcement sentence; witheula=accepted&eula_lang=ru→ 200,/etc/eula-accepted=1.0 ru web 2026-09-01T20:11:23Z,and the next SSH login walked the (updated) claim shell transparently and repaired
/etc/passwd— the claimed-camera path of the edited script.test_shell_parse.sh(134 scripts) andSTRICT=1 test_strip_shell_comments.shpass.Scope
general/package/all-patches/linux/(those go to OpenIPC/linux)general/overlay/or in a sharedload_<vendor>script hardcodes a value specific to my boardLD_PRELOAD, and no binaries that cannot be rebuilt from source