Actions
Bug #2309
closedInvalid mac address leads to host data being lost
Description
I was preparing a machine that I didn't know the full mac address for, so I entered 'aa:bb:cc:dd:ee:ff:gg'. When I actually tried to create the host, I got this error:
invalid value for Integer: "0xgg" ArgumentError invalid value for Integer: "0xgg" lib/net/validations.rb:43:in `normalize_mac' lib/net/validations.rb:43:in `map' lib/net/validations.rb:43:in `normalize_mac' app/models/host.rb:933:in `normalize_addresses' app/models/orchestration.rb:50:in `valid?' app/controllers/hosts_controller.rb:89:in `create' lib/foreman/thread_session.rb:31:in `clear_thread'
Seems like there's two issues here:
1) I was allowed to enter a MAC with too many octets
2) Validation failed when one of the octets contained invalid hex characters
Actions