{"action":"closed","issue":{"url":"https://api.github.com/repos/tumblr/collins/issues/303","labels_url":"https://api.github.com/repos/tumblr/collins/issues/303/labels{/name}","comments_url":"https://api.github.com/repos/tumblr/collins/issues/303/comments","events_url":"https://api.github.com/repos/tumblr/collins/issues/303/events","html_url":"https://github.com/tumblr/collins/issues/303","id":81453416,"number":303,"title":"API IMPI Intake password validation / error.minLength","user":{"login":"froxart","id":12627141,"avatar_url":"https://avatars.githubusercontent.com/u/12627141?v=3","gravatar_id":"","url":"https://api.github.com/users/froxart","html_url":"https://github.com/froxart","followers_url":"https://api.github.com/users/froxart/followers","following_url":"https://api.github.com/users/froxart/following{/other_user}","gists_url":"https://api.github.com/users/froxart/gists{/gist_id}","starred_url":"https://api.github.com/users/froxart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/froxart/subscriptions","organizations_url":"https://api.github.com/users/froxart/orgs","repos_url":"https://api.github.com/users/froxart/repos","events_url":"https://api.github.com/users/froxart/events{/privacy}","received_events_url":"https://api.github.com/users/froxart/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-27T13:44:55Z","updated_at":"2015-06-08T19:53:21Z","closed_at":"2015-06-08T19:53:21Z","body":"Hey, i have an issue with the api intake. Exactly adding a ipmi password which is only 5 chars long (default min length = 8). (and yes i know its a bad length, but the IPMI address is not public! And Collins is also able to create random Passwords with a length of 5 chars without any errors)\r\n\r\nExample:\r\n```\r\ncurl --basic -u blake:admin:first \\\r\n-d password=ptest \\\r\nhttp://collins.dev:9000/api/asset/TEST_ASSET/ipmi\r\n\r\n{\"status\":\"error\",\"data\":{\"message\":\"Data submission error: error.minLength\"}}\r\n```\r\n\r\nI was able to fix it by editing the **IpmiApi.scala**\r\nFROM:\r\n```\r\n  val IPMI_FORM = Form(\r\n    mapping(\r\n      \"username\" -> optional(text(1)),\r\n      \"password\" -> optional(text(8)),\r\n      \"address\" -> optional(text(7)),\r\n      \"gateway\" -> optional(text(7)),\r\n      \"netmask\" -> optional(text(7))\r\n    )(IpmiForm.apply)(IpmiForm.unapply)\r\n  )\r\n```\r\nTO:\r\n```\r\n  val IPMI_FORM = Form(\r\n    mapping(\r\n      \"username\" -> optional(text(1)),\r\n      \"password\" -> optional(text(minLength=0, maxLength=16)),\r\n      \"address\" -> optional(text(7)),\r\n      \"gateway\" -> optional(text(7)),\r\n      \"netmask\" -> optional(text(7))\r\n    )(IpmiForm.apply)(IpmiForm.unapply)\r\n  )\r\n```\r\n\r\nIs it possible to include it to the collins source. So i doesn't have to maintain and compile my own version for that?\r\n\r\nBest Regards,\r\nKai  "}}