Skip to content

fix display user name generation - #4069

Open
benderl wants to merge 3 commits into
openWB:masterfrom
benderl:fix-display-users
Open

benderl wants to merge 3 commits into
openWB:masterfrom
benderl:fix-display-users

Conversation

@benderl

@benderl benderl commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

user_name was always set to "Display-Intern", preventing creation of users for external openWB

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes consistently fix external display-user creation without introducing unresolved issues.

0 open findings

What changed in this PR

Fixes display-user naming so external openWB instances receive IP-specific users while preserving the internal display account.

Changes:

  • Generates Display-Intern only for localhost and Display-{IP} otherwise.
  • Prevents removal of the internal display user.
  • Safely handles failed user-existence lookups.
File Description
packages/​helpermodules/​mosquitto_dynsec/​user_handler.py Corrects display-user generation and removal safeguards.
packages/​helpermodules/​mosquitto_dynsec/​mosquitto_dynsec.py Uses the corrected generation logic for required users.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@benderl benderl changed the title fis display user name generation fix display user name generation Oct 8, 2026
@benderl
benderl requested a review from ndrsnhs October 8, 2026 06:59
@benderl benderl added the bug Something isn't working label Oct 8, 2026

@tpd-opitz tpd-opitz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this matters

A single module-level constant is enough if the special-case IP is only used in this file. It keeps the change small while still removing the magic value duplication. If you want to go one step further, INTERNAL_DISPLAY_USER = "Display-Intern" would also make the username special case clearer, but it’s optional.

Comment thread packages/helpermodules/mosquitto_dynsec/user_handler.py Outdated
Comment thread packages/helpermodules/mosquitto_dynsec/user_handler.py Outdated
Comment thread packages/helpermodules/mosquitto_dynsec/user_handler.py Outdated
Comment thread packages/helpermodules/mosquitto_dynsec/user_handler.py Outdated
Co-authored-by: Thomas Papendieck <14850347+tpd-opitz@users.noreply.github.com>
@benderl

benderl commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@tpd-opitz
Habe es noch etwas bearbeitet. Jetzt ist die lokale IP nur noch in user_handler.py vorhanden.

@benderl
benderl force-pushed the fix-display-users branch from 1463631 to 9a0f62f Compare October 8, 2026 09:34
@benderl benderl closed this Oct 8, 2026
@benderl
benderl deleted the fix-display-users branch October 8, 2026 09:43
@benderl
benderl restored the fix-display-users branch October 8, 2026 09:43
@benderl benderl reopened this Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants