{"action":"opened","issue":{"url":"https://api.github.com/repos/fatfreecrm/fat_free_crm/issues/452","labels_url":"https://api.github.com/repos/fatfreecrm/fat_free_crm/issues/452/labels{/name}","comments_url":"https://api.github.com/repos/fatfreecrm/fat_free_crm/issues/452/comments","events_url":"https://api.github.com/repos/fatfreecrm/fat_free_crm/issues/452/events","html_url":"https://github.com/fatfreecrm/fat_free_crm/issues/452","id":89460184,"number":452,"title":"Entering very long url into linkedin field creates DB error","user":{"login":"steveyken","id":149198,"avatar_url":"https://avatars.githubusercontent.com/u/149198?v=3","gravatar_id":"","url":"https://api.github.com/users/steveyken","html_url":"https://github.com/steveyken","followers_url":"https://api.github.com/users/steveyken/followers","following_url":"https://api.github.com/users/steveyken/following{/other_user}","gists_url":"https://api.github.com/users/steveyken/gists{/gist_id}","starred_url":"https://api.github.com/users/steveyken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveyken/subscriptions","organizations_url":"https://api.github.com/users/steveyken/orgs","repos_url":"https://api.github.com/users/steveyken/repos","events_url":"https://api.github.com/users/steveyken/events{/privacy}","received_events_url":"https://api.github.com/users/steveyken/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-19T04:10:53Z","updated_at":"2015-06-19T04:10:53Z","closed_at":null,"body":"(this occurs on Postgres DB, haven't checked the mysql or sqllite)\r\n\r\n* edit a contact\r\n* enter a very long link into Linked In field\r\n* press submit\r\n\r\nDB error is thrown: \r\n\r\n    ActiveRecord::StatementInvalid (PG::StringDataRightTruncation: ERROR:  value too long for type character varying(128)\r\n     : UPDATE \"contacts\" SET \"department\" = $1, \"fax\" = $2, \"linkedin\" = $3, \"skype\" = $4, \"updated_at\" = $5 WHERE \"contacts\".\"id\" = $6):\r\n    app/models/entities/contact.rb:134:in `update_with_account_and_permissions'\r\n    app/controllers/entities/contacts_controller.rb:86:in `block in update'\r\n    app/controllers/entities/contacts_controller.rb:85:in `update'\r\n\r\nFields like this should be validated properly in Rails with maxlength as appropriate."}}