ShelbyTV / shelby_gt

Rails API services for Shelby GT
2 stars 0 forks source link

Users with "null" user_image #204

Open iceberg901 opened 11 years ago

iceberg901 commented 11 years ago

We have users who have their user_image and user_image_original attributes equal to the string "null" instead of the value nil, like one would expect.

Example: http://api.shelby.tv/v1/user/520bdff9b415cc691e0e10af

We seem to have already applied bandaids around this in some parts of our stack, but when that string gets through to the front end it can break unsuspecting code that is depending on that string to be a valid URL for an image, particularly code that uses that attribute to generate a background-image: url() in CSS.

Can't really figure out how a user could get into this state, but it bears investigation at some point.