Project

General

Profile

Actions

Bug #1743

closed

Validation of name parameters always fails

Added by Sam Kottler over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
Rails
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Steps to reproduce:
1) Install a fresh version of Foreman from Git (or the nightly builds)
2) Try to add a new record of any type to uses the "name" parameter. Puppetclass, hostgroup, etc.
3) Get a validation error even when the field is valid.

https://skitch.com/skottler/egyct/1-root-ubuntu-12-usr-share-foreman-ssh

Setting the priority to immediate because this seems like a 1.0 release blocker.


Related issues 2 (0 open2 closed)

Related to Foreman - Bug #2393: Couple of models broken with audited 3.0.0Closed04/10/2013Actions
Has duplicate Foreman - Bug #1748: When creating new hostgroup, the name is always removed and prevent to save the hostgroupDuplicateOhad Levy07/12/2012Actions
Actions #1

Updated by Michael Coulter over 11 years ago

Observing same behaviour. Seen with 1.0-rc and nightly debs. Cranked log_level up to debug and this appears to be the culprit:

WARNING: Can't mass-assign protected attributes: architecture_ids, name, medium_ids, release_name, minor, ptable_ids, major, family

Looking around at the models, some already have attr_accessible declarations and some don't. I'm not sure how this is meant to work, and what actually provoked the breakage (i.e. is it a foreman related change, or better safety checks in rails).

Actions #2

Updated by Ohad Levy over 11 years ago

I wonder if this is only deb/ubuntu, I'll try to have a look, but i have a feeling the rails packages include a few more patches on top of the 3.0.15 release

Actions #3

Updated by Ohad Levy over 11 years ago

OK, I can reproduce, it seems a recent gem upgrade has been triggering this change, I'll try to narrow it down and find out which gem changes the behavior.

Actions #4

Updated by Ohad Levy over 11 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions #5

Updated by Sam Kottler over 11 years ago

Cool! Thanks Ohad.

Do you think it makes sense to add a functional test to prevent this from happening again?

Actions

Also available in: Atom PDF