Bug 55376 - Don't allow netmask as ip value when importing computers
Don't allow netmask as ip value when importing computers
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 5.0
Other Linux
: P5 normal (vote)
: UCS@school 5.0 v5
Assigned To: Julian Helms
Tobias Wenzel
https://git.knut.univention.de/univen...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-11-01 15:45 CET by Tobias Wenzel
Modified: 2024-03-21 15:49 CET (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.017
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): bitesize
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Wenzel univentionstaff 2022-11-01 15:45:45 CET
When running the computer import with 255.255.248.0 as "ip_address", no error is throw, but it should:

> IP-Adresse des Rechnerobjektes und optional die passende Netzmaske; alternativ das Ziel-IP-Subnetz


/usr/share/ucs-school-import/scripts/import_computer test.csv

cat test.csv
windows	school1Win01	00:0c:29:12:23:34	school1	255.255.248.0

This can be easily tested by checking if the first octed is equal to 255.
Comment 2 Julian Helms univentionstaff 2024-02-06 13:34:19 CET
As discussed - Merged and built:

Package: ucs-school-import
Version: 18.0.41
Branch: ucs_5.0-0
Scope: ucs-school-5.0
Comment 3 Tobias Wenzel univentionstaff 2024-02-06 13:34:44 CET
QA

- [x] code review
- [x] functional review OK (see below)
- [x] advisory
- [x] changelog


univention-app info
UCS: 5.0-6 errata915
Installed: self-service-backend=5.0 ucsschool=5.0 v4



before fix:

root@primary:/tmp# cat test.csv 
windows	school1Win01	00:0c:29:12:23:34	school1	255.255.248.0

root@primary:/tmp# /usr/share/ucs-school-import/scripts/import_computer test.csv

input file is  : test.csv
Processing line 1: windows	school1Win01	00:0c:29:12:23:34	school1	255.255.248.0
 WARNING: no netmask specified for ip address 255.255.248.0/24 using 255.255.255.0
Processing of line 1 completed


after fix

root@primary:/tmp# /usr/share/ucs-school-import/scripts/import_computer test.csv
input file is  : test.csv
Processing line 1: windows	school1Win03	00:0c:29:12:23:36	school1	255.255.250.0
 WARNING: The ip address 255.255.250.0 can NOT start with 255.
WARNING: no netmask specified for ip address 255.255.250.0/24 using 255.255.255.0


-> works as expected.



-> waiting for jenkins before setting to verified
Comment 4 Julian Helms univentionstaff 2024-02-07 15:27:50 CET
Fixed typo in test 35_import-computer.py

As discussed - merged and built

Package: ucs-test-ucsschool
Version: 7.3.164
Branch: ucs_5.0-0
Scope: ucs-school-5.0
Comment 5 Tobias Wenzel univentionstaff 2024-02-08 08:25:06 CET
Jenkins is happy / tests pass -> verify.
Comment 6 Johannes Königer univentionstaff 2024-03-21 15:49:47 CET
UCS@school 5.0 v5 has been released.

- https://docs.software-univention.de/ucsschool-changelog/5.0v5/en/changelog.html
- https://docs.software-univention.de/ucsschool-changelog/5.0v5/de/changelog.html

If this error occurs again, please clone this bug.