Repository navigation
Conversation
'+' separates school and group in the school-qualified LINBO group id (<school>+<group>), so a group name must not contain it. validateDeviceRow() now treats such a row as invalid and the device is skipped like any other invalid row. Refs linuxmuster#206 Signed-off-by: Tom Lehmann <tom.lehmann@netzint.de> Assisted-by: Claude
TomlDev
force-pushed
the
fix/reject-plus-in-device-group
branch
from
October 1, 2026 10:43
8331021 to
a447a21
Compare
TomlDev
marked this pull request as ready for review
October 2, 2026 07:06
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.
Optional hardening requested in the review of #207, as a separate PR. Refs #206.
Problem
The school-qualified LINBO group id
<school>+<group>(#207, #206) is unambiguous only because a group name never contains+. Today only sophomorix guarantees that. linuxmuster-api derives the owning school from the file name, so base7 has to enforce it as well.Change
validateDeviceRow()rejects a device row whose group (column 3) contains+. The row is skipped like any other invalid row: it returns(False, None), sogetDevicesArray()leaves the device out and import-devices does not process it. The check runs before the hostname, MAC and IP checks and silently returns, in the same way as those checks; no new log line is added. The separator is a named constant,LINBO_GROUP_SEPARATOR, infunctions/network.py.validateDeviceRow()receives the plain group fromdevices.csv(the group column is never stored qualified, see #207), so there is no already-qualified id on this path and every+is rejected, fordefault-schooland for other schools alike.Tests
tests/test_functions_network.py:default-schooland a non-default school+(abc+raum101,raum+101, leading and trailing+) are rejected for bothpytest testswith a stand-inenvironmentmodule (linuxmuster-common is not installed on my machine): 41 passed (30 before). flake8 (--max-line-length=100) reports nothing new in the changed files.Base
Based on
feat/per-school-groups, where the other per-school group changes go.